forked from shadivakhand/wordpress-seo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
76 lines (73 loc) · 2.16 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
extends: yoast
root: true
parserOptions:
ecmaVersion: 2018
sourceType: module
settings:
react:
version: "18.2"
rules:
no-prototype-builtins: 0
comma-dangle:
- error
- arrays: always-multiline
objects: always-multiline
imports: always-multiline
exports: always-multiline
functions: never
overrides:
- files:
- "packages/*/tests/**/*.js"
- "packages/*/spec/**/*.js"
# Temporary exclusion:
- "packages/components/a11y/tests/**/*.js"
env:
jest: true
rules:
no-restricted-imports: "off"
- files:
- "packages/components/**/*.js"
rules:
react/jsx-no-bind: 1
react/require-default-props: 1
react/default-props-match-prop-types: 1
react/no-unused-prop-types: 1
require-jsdoc: 1
- files:
- "packages/yoastseo/**/*.js"
settings:
import/core-modules: [ "yoastseo" ]
rules:
complexity: 1
# Longer grace period for Yoast config.
no-shadow: [ 1, { "builtinGlobals": false, "hoist": "all", "allow": [ ] } ]
require-jsdoc: [ 1, { "require": { "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true, "FunctionExpression": true } } ]
no-useless-escape: 1
import/no-named-as-default: 0
import/no-unresolved: [ "error", { ignore: [ "premium-configuration/data/morphologyData" ] } ]
- files:
- "packages/yoast-components/**/*.js"
rules:
complexity: [ 1, 6 ]
// A wrapping label is not necessary when there already is an htmlFor attribute.
jsx-a11y/label-has-for: [ "error", { required: "id" } ]
require-jsdoc: 1
react/button-has-type: 1
react/default-props-match-prop-types: 1
react/no-unused-prop-types: 1
react/no-access-state-in-setstate: 1
react/no-unused-state: 1
react/jsx-no-bind: 1
react/jsx-no-target-blank: 1
react/require-default-props: 1
react/forbid-foreign-prop-types: 1
import/no-duplicates: 0
import/named: 0
import/no-extraneous-dependencies: 0
env:
jest: true
- files:
- "packages/**/tests/**/*Test.js"
rules:
no-console: 0
react/jsx-no-bind: 0