-
Notifications
You must be signed in to change notification settings - Fork 38
/
.eslintrc.js
57 lines (56 loc) · 1.23 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
const eslintConfig = {
root: true,
extends: [ 'plugin:@code-atlantic/eslint-plugin/recommended' ],
globals: {
wp: 'readonly',
wpApiSettings: 'readonly',
pum_vars: 'readonly',
pum_site_vars: 'readonly',
pum_admin_vars: 'readonly',
pum_block_editor_vars: 'readonly',
window: 'readonly',
},
env: {
browser: true,
jquery: true,
},
settings: {
jsdoc: {
mode: 'typescript',
},
'import/resolver': {
node: {
moduleDirectory: [ 'node_modules' ],
},
},
},
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: [ require.resolve( '@wordpress/babel-preset-default' ) ],
},
},
rules: {},
overrides: [
{
// Turns off some of esnext rules for our assets JS until we migrate to babel or other.
files: [ 'assets/js/**/*.js' ],
rules: {
'arrow-parens': 'off',
'arrow-spacing': 'off',
'computed-property-spacing': 'off',
'constructor-super': 'off',
'no-const-assign': 'off',
'no-dupe-class-members': 'off',
'no-duplicate-imports': 'off',
'no-useless-computed-key': 'off',
'no-useless-constructor': 'off',
'no-var': 'off',
'object-shorthand': 'off',
'wrap-iife': 'off',
camelcase: 'any',
},
},
],
};
module.exports = eslintConfig;