-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
47 lines (45 loc) · 1.4 KB
/
eslint.config.mjs
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
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
export default [
{ files: ['src/**/*.{js,mjs,cjs,ts}'] },
{ ignores: ['dist/**'] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'curly': ['error', 'multi-line'],
'eqeqeq': ['error', 'always', { null: 'ignore' }],
'indent': ['error', 4],
'no-console': 'error',
'no-extra-semi': 'error',
'no-multiple-empty-lines': [
'error',
{
max: 1,
maxEOF: 1
}
],
'no-trailing-spaces': 'error',
'no-unneeded-ternary': [
'error',
{ defaultAssignment: false }
],
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'prefer-const': [
'error',
{
destructuring: 'all',
ignoreReadBeforeAssign: true
}
],
'prefer-spread': 'error',
'prefer-template': 'error',
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'space-before-function-paren': ['error', 'always'],
}
}
];