-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.mjs
51 lines (47 loc) · 1.35 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
48
49
50
51
import typescriptEslint from 'typescript-eslint'
import globals from 'globals'
import pluginJs from '@eslint/js'
import stylistic from '@stylistic/eslint-plugin'
export default [
pluginJs.configs.recommended,
...typescriptEslint.configs.recommended,
{
ignores: [
'**/node_modules',
'**/dist',
'**/coverage',
'**/ecosystem.config.js'
]
},
{
plugins: {
'@stylistic': stylistic
},
languageOptions: {
globals: {
...globals.node
},
ecmaVersion: 12,
sourceType: 'module'
},
rules: {
eqeqeq: 'error',
'no-unused-vars': 'warn',
camelcase: ['warn', { properties: 'never', ignoreDestructuring: true, ignoreImports: true }],
'no-var': 'error',
'no-useless-return': 'error',
'no-else-return': 'error',
'no-empty': 'error',
'no-duplicate-imports': 'error',
'@stylistic/indent': ['error', 2, { SwitchCase: 1 }],
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'never'],
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/space-before-function-paren': ['error', { named: 'never' }],
'@stylistic/space-in-parens': 'error',
'@stylistic/space-before-blocks': 'error',
'@stylistic/comma-dangle': 'error'
}
}
]