-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.mjs
32 lines (31 loc) · 1.21 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
import ts from 'typescript-eslint'
import eslintConfigPrettier from 'eslint-config-prettier'
export default ts.config(
...ts.configs.recommended,
eslintConfigPrettier,
// If ignores is used without any other keys in the configuration object, then the patterns act as global ignores.
// ref: https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
{
ignores: ['dist/**/*']
},
{
rules: {
'prefer-arrow-callback': 'error',
'func-style': ['error', 'expression'],
'no-trailing-spaces': 'error',
'no-multiple-empty-lines': 'error',
'camelcase': 'error',
'default-case-last': 'error',
'eqeqeq': 'error',
'no-var': 'error',
'yoda': 'error',
'array-bracket-spacing': 'off',
'array-element-newline': ['error', 'consistent'],
'arrow-spacing': ['error', { before: true, after: true }],
'comma-spacing': ['error', { before: false, after: true }],
'linebreak-style': ['error', 'unix'],
'spaced-comment': ['error', 'always'],
'no-unused-vars': 'off'
}
}
)