-
-
Notifications
You must be signed in to change notification settings - Fork 147
/
eslint.config.js
53 lines (49 loc) · 1.15 KB
/
eslint.config.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
import globals from 'globals';
import pluginJs from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import tseslint from 'typescript-eslint';
export default [
{
ignores: [
'*/', '!src/', '!tests/',
'**/dist/',
],
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
stylistic.configs.customize({
indent: 'tab',
braceStyle: '1tbs',
arrowParens: true,
semi: true,
jsx: false,
}),
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
...globals.jasmine,
...globals.amd,
...globals.commonjs,
Nette: 'readable',
Tracy: 'writeable',
},
},
plugins: {
'@stylistic': stylistic,
},
rules: {
'@stylistic/no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }],
'@stylistic/new-parens': ['error', 'never'],
'@stylistic/padded-blocks': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'prefer-arrow-callback': 'error',
'arrow-body-style': 'error',
'eqeqeq': ['error', 'always', { null: 'ignore' }],
'no-var': 'error',
'prefer-const': 'off',
},
},
];