-
Notifications
You must be signed in to change notification settings - Fork 136
/
.eslintrc.js
85 lines (85 loc) · 3.47 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
module.exports = {
extends: ['expensify', 'prettier'],
parser: '@typescript-eslint/parser',
overrides: [
{
files: ['*.js', '*.jsx'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
// Allow JSX to be written in any file ignoring the extension type
'react/jsx-filename-extension': 'off',
'rulesdir/no-api-in-views': 'off',
'rulesdir/no-multiple-api-calls': 'off',
'rulesdir/prefer-import-module-contents': 'off',
'no-constructor-return': 'off',
'max-classes-per-file': 'off',
'arrow-body-style': 'off',
'es/no-nullish-coalescing-operators': 'off',
'rulesdir/prefer-underscore-method': 'off',
'es/no-optional-chaining': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
},
{
files: ['*.ts', '*.tsx'],
extends: [
'expensify',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:import/typescript',
'plugin:you-dont-need-lodash-underscore/all',
'prettier',
'plugin:prettier/recommended',
],
plugins: ['react', 'import', '@typescript-eslint'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'prefer-regex-literals': 'off',
'rulesdir/prefer-underscore-method': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'valid-jsdoc': 'off',
'es/no-optional-chaining': 'off',
'es/no-nullish-coalescing-operators': 'off',
'react/jsx-filename-extension': ['error', {extensions: ['.tsx', '.jsx']}],
'import/no-unresolved': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': ['error', {argsIgnorePattern: '^_'}],
'@typescript-eslint/consistent-type-imports': ['error', {prefer: 'type-imports'}],
'@typescript-eslint/consistent-type-exports': ['error', {fixMixedExportsWithInlineTypeSpecifier: false}],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/array-type': ['error', {default: 'array-simple'}],
'@typescript-eslint/consistent-type-definitions': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
},
],
};