-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
51 lines (49 loc) · 1.54 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
env: {
commonjs: true,
es6: true,
node: true,
},
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
// Prettier must go last so that it can turn off other rules
'prettier',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaVersion: 2018,
},
rules: {
// These get flagged incorrectly because none of the code being linted
// actually ends up in the `dist. Without this, nearly all imports
// would error with "<Package> should be listed in the project's
// dependencies, not devDependencies".
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
// Enabled in airbnb, but we don't want to use extensions in TS files
'import/extensions': 'off',
'import/no-unresolved': 'off',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
},
overrides: [
{
files: ['**/*.js', '**/*.jsx'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
],
};