-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
78 lines (78 loc) · 2.1 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
71
72
73
74
75
76
77
78
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'prettier'],
env: {
browser: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:compat/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/typescript',
'prettier',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
'quotes': ['error', 'single'],
'no-param-reassign': 'error',
'no-plusplus': 'off',
'no-shadow': 'off',
'no-use-before-define': 'error',
'no-constant-condition': 'off',
'import/no-duplicates': 'error',
'import/no-cycle': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-unused-modules': 'off',
'compat/compat': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-type': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['UPPER_CASE', 'camelCase'],
types: ['boolean', 'number', 'string'],
},
{
selector: 'variable',
format: ['camelCase'],
types: ['function'],
},
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false,
},
},
],
'comma-dangle': ['error', 'always-multiline'],
'arrow-body-style': ['error', 'as-needed'],
},
globals: {
describe: true,
it: true,
jest: true,
beforeEach: true,
beforeAll: true,
afterEach: true,
expect: true,
afterAll: true,
},
};