-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (49 loc) · 1.28 KB
/
eslint.config.mjs
File metadata and controls
50 lines (49 loc) · 1.28 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
import js from '@eslint/js'
import stylistic from '@stylistic/eslint-plugin'
import globals from 'globals'
export default [
js.configs.recommended,
stylistic.configs.customize({
indent: 2,
quotes: 'single',
semi: false,
arrowParens: false,
braceStyle: '1tbs',
commaDangle: 'never'
}),
{
languageOptions: {
globals: {
...globals.browser
}
},
rules: {
// Match neostandard/StandardJS conventions
'@stylistic/space-before-function-paren': ['error', 'always'],
'@stylistic/arrow-parens': ['error', 'as-needed'],
'@stylistic/operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before' } }],
'@stylistic/max-statements-per-line': 'off',
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', argsIgnorePattern: '^_', ignoreRestSiblings: true }]
}
},
{
files: ['assets/js/sidebar-toggle.js'],
languageOptions: {
globals: {
bootstrap: 'readonly'
}
}
},
{
ignores: [
'assets/js/critical/languageSelector.js',
'assets/js/critical/color.js',
'assets/js/analytics.js',
'assets/js/flexsearch.js',
'assets/js/navbar.js',
'assets/js/sharing.js',
'assets/js/vendor/**',
'node_modules/**'
]
}
]