-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.mjs
45 lines (44 loc) · 1.24 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
import pluginJs from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ files: ['**/*.js'], languageOptions: { sourceType: 'script' } },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
eslintPluginPrettierRecommended,
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'no-public'
}
],
'prettier/prettier': [
'error',
{
semi: true,
tabWidth: 2,
printWidth: 140,
singleQuote: true,
trailingComma: 'none',
endOfLine: 'auto',
singleAttributePerLine: false
}
],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
]
}
}
];