1.0.20 โข Published 2 years ago
eslint-config-emiliosp v1.0.20
emiliosp ESLint config ๐งน
This package provides an ESLint + Prettier configuration for React.js JavaScript projects.
This ESLint config extends the following configs
eslint:recommended
plugin:react/recommended
prettier
prettier/react
plugin:sonarjs/recommended
On top of the base config, these rules are applied
react-hooks/rules-of-hooks
react-hooks/exhaustive-deps
no-case-declarations: "off",
no-inner-declarations
prefer-const
curly: "error
spaced-comment
radix: "error,
one-var
object-shorthand
no-var
no-param-reassign
no-underscore-dangle
no-undef-init
no-throw-literal
no-new-wrappers
no-eval
no-caller
no-bitwise
eqeqeq
max-classes-per-file
guard-for-in
complexity
arrow-body-style
no-unused-expressions
semi
max-lines-per-function
import/order
sonarjs/no-duplicate-string
sonarjs/cognitive-complexity
sonarjs/no-small-switch
sonarjs/no-inverted-boolean-check
The styling follows the prettier recommendations plus this custom config
{
"singleQuote": true,
"printWidth": 120
}
Installation ๐ป
To use this package, install it as a devDependency inside your project
yarn add --dev eslint-config-emiliosp
Configuration ๐ช
Create a .eslintrc
file with the following content
{
"extends": ["eslint-config-emiliosp"]
}
Add a lint script inside the package.json
"scripts": {
"lint": "eslint src --ext .js",
...
}
Run the linter ๐ ๐ ๐
yarn lint
1.0.19
2 years ago
1.0.18
2 years ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.20
2 years ago
1.0.11
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago