-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.cjs
More file actions
68 lines (67 loc) · 1.76 KB
/
Copy patheslint.config.cjs
File metadata and controls
68 lines (67 loc) · 1.76 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
/**
* ESLint flat config: WordPress Scripts defaults plus project overrides.
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/
*/
const globals = require( 'globals' );
const wpScriptsEslintConfig = require( '@wordpress/scripts/config/eslint.config.cjs' );
module.exports = [
...wpScriptsEslintConfig,
{
ignores: [
'**/build/**',
'**/node_modules/**',
'**/vendor/**',
],
},
{
languageOptions: {
globals: {
...globals.browser,
FS: 'readonly',
},
},
settings: {
// JS-only project: use node resolver instead of the broken hoisted typescript resolver.
'import/resolver': {
node: {
extensions: [ '.js', '.jsx' ],
},
},
},
rules: {
curly: [ 'error', 'multi' ],
'@wordpress/no-unsafe-wp-apis': 'off',
'@wordpress/no-base-control-with-label-without-id': 'off',
'@wordpress/no-unused-vars-before-return': 'off',
'@wordpress/i18n-translator-comments': 'off',
'jsdoc/check-line-alignment': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-description': 'off',
'no-console': 'off',
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'no-shadow': 'off',
'no-nested-ternary': 'off',
'camelcase': 'off',
'eqeqeq': 'off',
'react-hooks/rules-of-hooks': 'off',
'react-hooks/exhaustive-deps': 'off',
'no-unused-expressions': 'off',
'no-alert': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'import/default': 'off',
'import/named': 'off',
},
},
];