-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
45 lines (45 loc) · 1.45 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// This file handles ESLINT policies and rules for linting any code repo I work on.
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"extends": ["plugin:react/recommended", "airbnb"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "react-hooks"],
"rules": {
"no-console": ["error", {"allow": ["info", "warn", "error"]}],
"curly": ["error", "all"],
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
"no-unused-vars": ["error", { "vars": "all", "argsIgnorePattern": "^_" }],
"comma-dangle": ["error", "never"],
"max-len": [
"error",
{
"code": 105,
"tabWidth": 2,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
],
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
"jsx-quotes": ["error", "prefer-single"],
"react/jsx-one-expression-per-line": ["error", { "allow": "literal" }],
"react/prop-types": "error",
"jsx-a11y/label-has-associated-control": "error",
"react-hooks/rules-of-hooks": "warn",
"react-hooks/exhaustive-deps": "warn",
"import/no-commonjs": "error",
"react/function-component-definition": ["error", { "namedComponents": "arrow-function" }],
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }]
}
}