-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
44 lines (44 loc) · 1.38 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
module.exports = {
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: `${__dirname}/tsconfig.eslint.json`,
},
plugins: ['import', '@typescript-eslint', 'prettier'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
node: {
extensions: ['.js', '.ts'],
},
},
},
rules: {
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-use-before-define': 0,
'import/no-cycle': ['error', { ignoreExternal: true }],
'import/extensions': 0,
'import/prefer-default-export': 0,
// 'acc' is disabled because that is the convention we use in reducer
// functions, and that value can usually be safely mutated.
// 'req' is disabled because we can attach props to an express request.
// 'draft' is disabled because we use it as the name for immer's draft state
// argument.
'no-param-reassign': [
'error',
{ props: true, ignorePropertyModificationsFor: ['acc', 'req', 'draft'] },
],
'prettier/prettier': 'error',
'no-underscore-dangle': 0,
'no-void': 0,
},
ignorePatterns: ['.eslintrc.js'],
};