-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
70 lines (70 loc) · 1.86 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['import', 'eslint-plugin-simple-import-sort', 'unused-imports'],
ignorePatterns: ['**/dist/*'],
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'prettier',
'plugin:import/recommended',
'plugin:@typescript-eslint/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'import/no-cycle': ['error', { allowUnsafeDynamicCyclicDependency: true }],
'import/no-unresolved': 'error',
'comma-dangle': ['error', 'always-multiline'],
eqeqeq: ['warn', 'smart'],
indent: ['error', 2, { SwitchCase: 1 }],
quotes: ['error', 'single'],
'eol-last': 'error',
semi: ['error', 'always'],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'jsx-quotes': ['error', 'prefer-single'],
'no-unused-vars': [
'error',
{ vars: 'all', args: 'none', ignoreRestSiblings: false },
],
'unused-imports/no-unused-imports-ts': ['error'],
'comma-spacing': ['error', { before: false, after: true }],
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import/newline-after-import': [
'error',
{ count: 1, considerComments: true },
],
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/ban-types': 'warn',
'import/named': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './src',
},
},
},
};