-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.eslintrc.js
41 lines (41 loc) · 1.18 KB
/
.eslintrc.js
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
module.exports = {
env: {
es6: true,
es2017: true,
es2020: true,
es2021: true,
node: true,
},
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
'extends': ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
rules: {
'@typescript-eslint/naming-convention': 'warn',
'@typescript-eslint/semi': 'warn',
curly: 'warn',
eqeqeq: 'warn',
'no-throw-literal': 'warn',
semi: 'off',
'comma-dangle': ['error', 'always-multiline'],
'linebreak-style': ['error', 'unix'],
'no-constant-condition': ['error', { checkLoops: false }],
'no-empty': ['error', { allowEmptyCatch: true }],
quotes: ['error', 'single', { avoidEscape: true }],
'quote-props': ['error', 'as-needed', { keywords: true, unnecessary: true, numbers: true }],
'sort-imports': [
'warn',
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
allowSeparatedGroups: true,
},
],
},
overrides: [{ files: ['**/*.test.ts'], env: { mocha: true } }],
};