-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
56 lines (54 loc) · 1.97 KB
/
Copy path.eslintrc.js
File metadata and controls
56 lines (54 loc) · 1.97 KB
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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'simple-import-sort', 'unused-imports', 'prettier', 'react'],
extends: [
'prettier',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'prettier/prettier': 2,
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/array-type": ["error", { "default": "array-simple", "readonly": "array-simple" }],
"@typescript-eslint/lines-between-class-members": "off",
'@typescript-eslint/no-use-before-define': ['error'],
'unused-imports/no-unused-imports': 2,
// 'import/no-cycle': 2,
'no-console': 1,
'no-dupe-keys': 1,
'no-use-before-define': "off",
'no-restricted-globals': 1,
'lines-between-class-members': [2, 'always', { exceptAfterSingleLine: true }],
'padding-line-between-statements': [
2,
{ blankLine: 'always', prev: 'function', next: '*' },
{ blankLine: 'always', prev: '*', next: 'function' },
{ blankLine: 'always', prev: 'export', next: '*' },
{ blankLine: 'always', prev: '*', next: 'export' },
{ blankLine: 'always', prev: 'multiline-const', next: '*' },
{ blankLine: 'always', prev: '*', next: 'return' },
],
'simple-import-sort/imports': 'error',
'no-unused-vars': [
'error',
{
args: 'all',
ignoreRestSiblings: true,
caughtErrors: 'all',
varsIgnorePattern: '^ignored|_+$',
argsIgnorePattern: '^_|props+$',
},
],
},
};