This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
.eslintrc
69 lines (66 loc) · 2.04 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
extends: yoast
parserOptions:
ecmaVersion: 2018
settings:
react:
version: "16.6"
overrides:
- files:
- "packages/*/tests/**/*.js"
- "packages/*/spec/**/*.js"
# Temporary exclusion:
- "packages/components/a11y/tests/**/*.js"
env:
jest: true
- 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/configuration-wizard/**/*.js"
rules:
react/no-unused-prop-types: 1
react/jsx-no-bind: 1
react/no-access-state-in-setstate: 1
require-jsdoc: 1
- files:
- "packages/replacement-variable-editor/**/*.js"
rules:
react/jsx-no-bind: 1
react/require-default-props: 1
- files:
- "packages/search-metadata-previews/**/*.js"
rules:
react/jsx-no-bind: 1
react/no-unused-state: 1
react/no-access-state-in-setstate: 1
react/require-default-props: 1
react/default-props-match-prop-types: 1
- files:
- "packages/yoastseo/**/*.js"
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
- files:
- "packages/analysis-report/**/*.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