-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy patheslint.config.js
More file actions
66 lines (62 loc) · 1.26 KB
/
eslint.config.js
File metadata and controls
66 lines (62 loc) · 1.26 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
/**
* ESLint flat config.
*
* Migrated from .eslintrc.js + .eslintignore for ESLint 9 / @wordpress/scripts 32.
*/
/**
* External dependencies
*/
const globals = require( 'globals' );
/**
* WordPress dependencies
*/
const wpPlugin = require( '@wordpress/eslint-plugin' );
const recommendedWithFormatting = wpPlugin.configs[ 'recommended-with-formatting' ];
module.exports = [
{
ignores: [
'vendor/**',
'node_modules/**',
'build/**',
'local/public/**',
'dist/**',
],
},
...recommendedWithFormatting,
{
languageOptions: {
globals: {
...globals.browser,
},
},
settings: {
// Use node resolver to avoid "typescript with invalid interface" from eslint-import-resolver-typescript.
'import/resolver': {
node: {
extensions: [ '.js', '.jsx', '.mjs', '.scss' ],
},
},
},
rules: {
'@wordpress/no-global-event-listener': 'off',
'jsdoc/check-indentation': 'error',
'@wordpress/dependency-group': 'error',
'import/order': [
'error',
{
groups: [
'builtin',
[ 'external', 'unknown' ],
'internal',
'parent',
'sibling',
'index',
],
},
],
'jsdoc/require-param': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/check-param-names': 'off',
},
},
];