-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
59 lines (59 loc) · 1.92 KB
/
.eslintrc
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
{
"root": true,
"extends": [
"plugin:@wordpress/eslint-plugin/recommended"
],
"env": {
"browser": true
},
"parserOptions": {
"requireConfigFile": false,
"babelOptions": {
"presets": [
"@wordpress/babel-preset-default"
]
}
},
"globals": {
"starterTemplates": true,
"astraSitesVars": true,
"ajaxurl": true,
"starterTemplatesPreview":true,
"jQuery": true
},
"rules": {
"jsdoc/require-param": "off",
"jsdoc/valid-types": "error",
"jsx-a11y/no-static-element-interactions": "off", // Should be enabled.
"jsx-a11y/click-events-have-key-events": "off", // Should be enabled.
"jsx-a11y/alt-text": "error",
"eqeqeq": "error",
"jsx-a11y/iframe-has-title": "error",
"jsdoc/check-param-names": "error",
"jsx-a11y/no-noninteractive-element-interactions": "off", // Should be enabled.
"@wordpress/i18n-no-variables": "error",
"no-template-curly-in-string": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"prefer-object-spread": "off", // Should be enabled.
"prefer-promise-reject-errors": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"radix": [ "error", "as-needed" ],
"require-await": "error",
"rest-spread-spacing": [ "error", "never" ],
"react/prop-types": "off", // Should be enabled.
"react-hooks/exhaustive-deps": [ "off", { "additionalHooks": "useSelect" } ],
"react/jsx-closing-tag-location": "error",
"react/jsx-fragments": "error",
"react/self-closing-comp": "error",
"react/jsx-first-prop-new-line": "error",
"react/jsx-no-literals": "off", // Should be enabled.
"react/jsx-no-useless-fragment": "off", // Should be enabled.
"import/order": [ "error", { "groups": [ "builtin", [ "external", "unknown" ], "internal", "parent", "sibling", "index" ] } ],
"func-style": ["error", "expression"],
"jsdoc/newline-after-description": "off"
}
}