-
Notifications
You must be signed in to change notification settings - Fork 47
/
.eslintrc.js
39 lines (39 loc) · 1.53 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
module.exports = {
extends: [
require.resolve('@box/frontend/eslint/base'),
require.resolve('@box/frontend/eslint/react'),
require.resolve('@box/frontend/eslint/typescript'),
],
rules: {
'class-methods-use-this': 0, // fixme
'flowtype/no-types-missing-file-annotation': 'off', // Allows types in TS files
'import/no-extraneous-dependencies': 'off', // All dependencies are included in dist bundle
'import/no-unresolved': 'off', // Allows JS files to import TS files
'import/prefer-default-export': 'off',
'prefer-destructuring': ['error', { object: true, array: false }],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }],
'@typescript-eslint/no-explicit-any': ['error', { ignoreRestArgs: true }],
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_' }],
},
},
{
files: ['**/__mocks__/*', '**/__tests__/*'],
rules: {
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'import/no-import-module-exports': 'off'
},
},
{
files: ['*.e2e.test.js'],
rules: {
'spaced-comment': 'off', // Allow JS files to use TS Triple-Slash Directives
},
},
],
};