-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
executable file
·90 lines (90 loc) · 2.5 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
"env": {
"browser": true,
"es2020": true
},
"extends": [
"plugin:@wordpress/eslint-plugin/recommended",
"plugin:react/recommended",
"airbnb",
"plugin:prettier/recommended",
"prettier",
"plugin:jest/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": ["react", "import"],
"rules": {
"prettier/prettier": [
"error",
{
"prettier": "@wordpress/prettier-config",
"useTabs": true,
"singleQuote": true,
"jsxSingleQuote": true,
"bracketSpacing": true,
"arrowParens": "avoid"
}
],
"quotes": ["error", "single", { "avoidEscape": true }],
"jsx-quotes": ["error", "prefer-single"],
"no-param-reassign": ["error", { "props": false }],
"no-use-before-define": [
"error",
{ "functions": false, "classes": true }
],
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-unused-vars": ["error", { "args": "none" }],
"consistent-return": ["error", { "treatUndefinedAsUnspecified": true }],
"array-callback-return": ["error", { "allowImplicit": true }],
"no-unused-expressions": [
"error",
{ "allowTernary": true, "allowShortCircuit": true }
],
"react/jsx-filename-extension": [
1,
{
"extensions": [".js", ".jsx"]
}
],
// Off //
"react/function-component-definition": "off",
"react/jsx-curly-newline": "off",
"react/react-in-jsx-scope": "off",
"react/state-in-constructor": "off",
"no-underscore-dangle": "off",
"no-nested-ternary": "off",
"default-param-last": "off",
"import/named": "off",
"react/destructuring-assignment": "off",
"jsx-a11y/anchor-is-valid": "off",
// Short term deactivate rules //
"no-shadow": "off",
"no-restricted-syntax": "off",
"radix": "off",
"@wordpress/no-base-control-with-label-without-id": "off",
"@wordpress/i18n-translator-comments": "off",
"@wordpress/i18n-no-variables": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/mouse-events-have-key-events": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsdoc/no-undefined-types": "off",
"jsdoc/check-param-names": "off",
"require-jsdoc": "off",
"jsdoc/require-param": "off",
"jsdoc/check-tag-names": "off",
// Long term deactivate rules //
"react/jsx-pascal-case": "off",
"react/prop-types": "off",
"react/jsx-props-no-spreading": "off",
"import/no-extraneous-dependencies": "off",
"import/first": "off",
"import/order": "off" // Needs to be organized
}
}