Repository navigation
Expand file tree
/
Copy path.eslintrc
More file actions
65 lines (65 loc) · 1.55 KB
/
Copy path.eslintrc
File metadata and controls
65 lines (65 loc) · 1.55 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
{
"env": {
"browser": true,
"es2020": true
},
"extends": [
"plugin:@wordpress/eslint-plugin/recommended-with-formatting",
"plugin:jest/recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"settings": {
"jest": {
"version": "latest"
},
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx",
".json"
]
}
}
},
"ignorePatterns": [
"webpack.config.js"
],
"rules": {
"@wordpress/i18n-text-domain": [
"error",
{
"allowedTextDomain": [
"wp-parsely"
]
}
],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/method-signature-style": "error", // Can be removed after we've updated to wp-scripts v28 or greater.
"@typescript-eslint/prefer-nullish-coalescing": "error",
// Enabling TS rule and disabling Base rule as it can report incorrect errors.
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
// Allow usage of Gutenberg experimental components.
"@wordpress/no-unsafe-wp-apis": "off",
// Allow link tag in JSDocs.
"jsdoc/check-tag-names": ["error", { "definedTags": ["link"] }],
// Disable import resolution checks for TypeScript files as TypeScript handles this.
"import/named": "off",
"import/no-extraneous-dependencies": "off",
// Allow imports from @wordpress package build-types for TypeScript type definitions.
"import/no-unresolved": ["error", {
"ignore": [
"@wordpress/.*/build-types/.*"
]
}]
}
}