-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.json
More file actions
82 lines (82 loc) · 1.84 KB
/
.eslintrc.json
File metadata and controls
82 lines (82 loc) · 1.84 KB
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
{
"root": true,
"extends": [
"plugin:@wordpress/eslint-plugin/recommended-with-formatting",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:eslint-comments/recommended"
],
"plugins": [],
"env": {
"browser": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"globals": {
"_": true,
"IsPrefersReducedMotion": true
},
"rules": {
"eslint-comments/no-unlimited-disable": "error",
"jsdoc/check-indentation": "error",
"no-shadow": "warn",
"@wordpress/no-unsafe-wp-apis": "warn",
/* WordPress surfaces snake_case keys and globals; allow them */
"camelcase": "off"
},
"overrides": [
{
"files": ["**/*.{ts,tsx}"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"sourceType": "module",
"project": ["./tsconfig.json", "./tests/js/tsconfig.json"]
},
"plugins": ["@typescript-eslint"],
"rules": {
"no-undef": "off",
"no-unused-vars": "off",
"no-shadow": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unused-vars": "error"
}
},
{
"files": ["**/*.d.ts"],
"parser": "@typescript-eslint/parser",
"rules": {
"no-undef": "off",
"import/no-unresolved": "off",
"@typescript-eslint/triple-slash-reference": "off"
}
},
{
"files": [
"**/__tests__/**/*.js",
"**/test/*.js",
"**/?(*.)test.js",
"tests/js/**/*.js"
],
"extends": ["plugin:jest/recommended"],
"rules": {
// Add Rules for Jest here
}
},
{
"files": ["tests/js/jest.config.js"],
"extends": [],
"rules": {
"jest/unbound-method": "off"
}
}
]
}