-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
37 lines (35 loc) · 1000 Bytes
/
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
// @ts-check
import tseslint from 'typescript-eslint'
import jseslint from '@eslint/js'
import stylistic from '@stylistic/eslint-plugin'
export default [
{
ignores: ['**/build/**', '**/dist/**', '**/docs/**', 'webpack.config.js', 'jest.config.js', '**/*.mjs'],
},
// syntax rules
jseslint.configs.recommended,
...tseslint.configs.recommended,
// code style rules
stylistic.configs['recommended-flat'],
stylistic.configs.customize({
indent: 2,
braceStyle: '1tbs',
quotes: 'single',
semi: false,
commaDangle: 'only-multiline',
}),
{
rules: {
'@stylistic/space-before-function-paren': ['error', { anonymous: 'always', asyncArrow: 'always', named: 'always' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
{
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^_'
}
]
},
},
]