mirror of
https://github.com/elyby/eslint-plugin.git
synced 2024-12-22 04:59:47 +05:30
Shareable ESLint config for the Ely.by's projects
docs/rules | ||
src | ||
tests/lib/rules | ||
.gitignore | ||
babel.config.js | ||
jest.config.js | ||
LICENSE.md | ||
package.json | ||
README.md | ||
tsconfig.json | ||
yarn.lock |
Ely.by ESLint rules
Set of ESLint rules used in development of Ely.by JS projects. Contains rules for pure JS, JSX, ReactJS and TS.
Installation
First of all install Ely.by ESLint plugin and eslint
peer dependency via preferred package manager:
# NPM users:
npm install @elyby/eslint-plugin eslint --save-dev
# Yarn users:
yarn add -D @elyby/eslint-plugin eslint
Then add the following configuration to your .eslintrc.js
file:
module.exports = {
extends: [
'plugin:@elyby/config',
],
}
And that's it!
You may still wish to override some of our rules, as well as the rest of our eslint configuration settings.
For example, you can specify the preferred env
for eslint:
module.exports = {
// ...rest of the configuration
env: {
browser: true,
es6: true,
},
};
Using our custom fixers
First of all, you must install Ely.by's ESLint plugin as described in the installation chapter.
After that you can enable our custom rules with defining our plugin in plugins
section:
module.exports = {
// ...rest of the configuration
plugins: [
'@elyby',
],
};
After that all custom rules will be available for use.
List of supported rules
- @elyby/jsx-closing-bracket-location: Validate closing bracket location in JSX
License
Ely.by ESLint plugin is licensed under the MIT License.