-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
49 lines (48 loc) · 1.39 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
module.exports = {
extends: ['airbnb-typescript-prettier'],
// Rules can be here to override the preset of eslint from airbnb, if they are too strict.
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
// We override and only check for ts files
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
// Avoids throwing an error when setting props to {}
'@typescript-eslint/ban-types': [
'error',
{
extendDefaults: true,
types: {
'{}': false,
},
},
],
// Should we keep the warning for consoles ?
'no-console': 'off',
'react/destructuring-assignment': 0,
'jsx-a11y/label-has-for': 0,
'jsx-a11y/label-has-associated-control': 0,
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
},
],
},
},
{
// enable the rule specifically for TypeScript files
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': ['error'],
},
},
],
};