-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
68 lines (68 loc) · 1.83 KB
/
Copy patheslint.config.js
File metadata and controls
68 lines (68 loc) · 1.83 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
export default [
{
files: ['src/**/*.js'],
ignores: ['src/vendor/**'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'script',
globals: {
window: 'readonly',
document: 'readonly',
console: 'readonly',
jQuery: 'readonly',
$: 'readonly',
jsyaml: 'readonly',
Highcharts: 'readonly',
$WowheadPower: 'readonly'
}
},
rules: {
'no-unused-vars': 'off',
'no-undef': 'off',
'semi': ['error', 'always'],
'quotes': ['error', 'single'],
'indent': ['error', 2],
// Enforce consistent spacing around keywords
'keyword-spacing': ['error', { before: true, after: true }],
// Enforce no spaces inside parentheses
'space-in-parens': ['error', 'never'],
// Enforce space before blocks
'space-before-blocks': ['error', 'always'],
// Enforce spacing around operators
'space-infix-ops': 'error',
// Enforce spacing after commas
'comma-spacing': ['error', { before: false, after: true }],
// Enforce space around binary operators
'space-around-operator': 'off',
// Enforce no space before function call parentheses
'func-call-spacing': ['error', 'never']
}
},
{
files: ['src/**/*.module.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
}
},
{
files: ['test/**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
describe: 'readonly',
beforeAll: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
test: 'readonly',
expect: 'readonly',
console: 'readonly',
document: 'readonly',
window: 'readonly',
$: 'readonly',
AppState: 'readonly'
}
}
}
];