-
Notifications
You must be signed in to change notification settings - Fork 59
/
.eslintrc.js
69 lines (69 loc) · 2.04 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
env: {
jest: true,
},
extends: [
'expensify',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:import/typescript',
'prettier',
'plugin:prettier/recommended',
],
plugins: [
'react',
'react-native',
'import',
'@typescript-eslint',
'eslint-plugin-tsdoc',
],
settings: {
'import/resolver': {
alias: [['@expensify/react-native-live-markdown', './src/index.tsx']],
},
},
root: true,
rules: {
'rulesdir/prefer-underscore-method': 'off',
'rulesdir/prefer-import-module-contents': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.tsx', '.jsx'] }],
"import/extensions": [
"error",
"ignorePackages",
{
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
'import/no-unresolved': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'no-use-before-define': 'off',
'es/no-nullish-coalescing-operators': 'off',
'es/no-optional-chaining': 'off',
'@typescript-eslint/no-use-before-define': 'off', // TODO consider enabling this (currently it reports styles defined at the bottom of the file)
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports' },
],
'@typescript-eslint/consistent-type-exports': [
'error',
{ fixMixedExportsWithInlineTypeSpecifier: false },
],
'valid-jsdoc': 'off',
'tsdoc/syntax': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/array-type': ['error', {default: 'array-simple'}],
'@typescript-eslint/consistent-type-definitions': 'off',
'curly': ['error', 'all'],
},
};