-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.js
81 lines (79 loc) · 1.71 KB
/
.eslintrc.js
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
/**
* Even though this is a JavaScript file, the config data itself is formatted as JSON to allow for easier comparison,
* as well as copy-and-paste from and to other .eslintrc JSON files.
*/
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
"extends": [
"plugin:@wordpress/eslint-plugin/recommended",
"plugin:import/errors"
],
"env": {
"browser": true
},
"plugins": [
"jsdoc"
],
"rules": {
"@wordpress/dependency-group": "off",
"@wordpress/react-no-unsafe-timeout": "error",
"import/no-unresolved": [
"error",
{
"commonjs": true,
"ignore": [
"^@wordpress\/[^/]+"
]
}
],
"jsdoc/check-param-names": "warn",
"jsdoc/check-tag-names": "warn",
"jsdoc/check-types": [
"warn",
{
"noDefaults": true
}
],
"jsdoc/newline-after-description": "warn",
"jsdoc/no-undefined-types": "warn",
"jsdoc/require-description-complete-sentence": "warn",
"jsdoc/require-hyphen-before-param-description": "warn",
"jsdoc/require-param": "warn",
"jsdoc/require-param-description": "warn",
"jsdoc/require-param-name": "warn",
"jsdoc/require-param-type": "warn",
"jsdoc/require-returns-type": "warn",
"jsdoc/valid-types": "warn",
"max-len": [
"warn",
120
],
"no-console": isProduction ? "error" : "warn",
"no-debugger": isProduction ? "error" : "warn",
"no-shadow": "off",
"no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "_",
"args": "after-used",
"argsIgnorePattern": "_",
"ignoreRestSiblings": true
}
],
"operator-linebreak": [
"error",
"before",
{
"overrides": {
"=": "none"
}
}
],
"react/prop-types": "warn",
"valid-jsdoc": [
"off",
{}
]
}
};