-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
124 lines (115 loc) · 3.49 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
const OFF = 0;
const ERROR = 2;
module.exports = {
env: {
es2021: true,
},
extends: [
'airbnb',
'airbnb/hooks',
'plugin:eslint-comments/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:unicorn/recommended',
'plugin:promise/recommended',
'plugin:jest/recommended',
'plugin:jest-dom/recommended',
'prettier',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'unicorn', 'promise'],
rules: {
camelcase: OFF,
radix: OFF,
'class-methods-use-this': OFF,
'consistent-return': OFF,
'func-names': OFF,
'import/no-dynamic-require': OFF,
'lines-between-class-members': OFF,
'max-classes-per-file': OFF,
'no-alert': OFF,
'no-await-in-loop': OFF,
'no-bitwise': OFF,
'no-console': OFF,
'no-continue': OFF,
'no-empty': OFF,
'no-param-reassign': OFF,
'no-plusplus': OFF,
'no-restricted-globals': OFF,
'no-restricted-syntax': OFF,
'no-shadow': OFF,
'no-underscore-dangle': OFF,
'no-unused-expressions': OFF,
'no-use-before-define': OFF,
'no-useless-constructor': OFF,
'no-useless-return': OFF,
'prefer-const': [ERROR, { destructuring: 'all' }],
'prefer-destructuring': OFF,
'import/extensions': OFF,
'import/no-extraneous-dependencies': OFF,
'import/prefer-default-export': OFF,
'eslint-comments/disable-enable-pair': [ERROR, { allowWholeFile: true }],
'promise/always-return': OFF,
'promise/catch-or-return': OFF,
'react/jsx-uses-react': OFF,
'react/react-in-jsx-scope': OFF,
'react/jsx-indent': [ERROR, 2],
'react/jsx-filename-extension': [ERROR, { extensions: ['.ts', '.tsx', '.json', '.js'] }],
'react/destructuring-assignment': OFF,
'react/jsx-props-no-spreading': OFF,
'react-hooks/rules-of-hooks': OFF,
'react/require-default-props': OFF,
'react/sort-comp': OFF,
'jsx-a11y/alt-text': OFF,
'jsx-a11y/click-events-have-key-events': OFF,
'jsx-a11y/no-static-element-interactions': OFF,
'jsx-a11y/anchor-is-valid': OFF,
'jsx-a11y/media-has-caption': OFF,
'unicorn/catch-error-name': OFF,
'unicorn/consistent-destructuring': OFF,
'unicorn/explicit-length-check': OFF,
'unicorn/filename-case': OFF,
'unicorn/import-style': OFF,
'unicorn/no-array-for-each': OFF,
'unicorn/no-array-reduce': OFF,
'unicorn/no-null': OFF,
'unicorn/no-process-exit': OFF,
'unicorn/prefer-module': OFF,
'unicorn/prefer-node-protocol': OFF,
'unicorn/prefer-query-selector': OFF,
'unicorn/prevent-abbreviations': OFF,
'@typescript-eslint/ban-ts-comment': OFF,
'@typescript-eslint/ban-types': OFF,
'@typescript-eslint/explicit-function-return-type': OFF,
'@typescript-eslint/explicit-module-boundary-types': OFF,
'@typescript-eslint/no-empty-function': OFF,
'@typescript-eslint/no-explicit-any': OFF,
'@typescript-eslint/no-non-null-assertion': OFF,
'@typescript-eslint/no-unused-vars': OFF,
'@typescript-eslint/no-useless-constructor': ERROR,
},
overrides: [
{
files: ['**/*.d.ts'],
rules: {
'import/no-duplicates': OFF,
},
},
{
files: ['server/**/*.ts'],
rules: {
'@typescript-eslint/no-var-requires': OFF,
'global-require': OFF,
},
},
],
};