forked from HospitalRun/hospitalrun-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
81 lines (81 loc) · 2.49 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
module.exports = {
ignorePatterns: ['commitlint.config.js', 'jest.config.js'],
env: {
browser: true,
es6: true,
'jest/globals': true,
},
extends: [
'react-app',
'airbnb',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'eslint-config-prettier',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json', './scripts/tsconfig.json'],
tsconfigRootDir: './',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules'],
},
typescript: {
alwaysTryTypes: true,
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
plugins: ['react', '@typescript-eslint', 'prettier', 'jest', 'import'],
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
"@typescript-eslint/explicit-module-boundary-types": 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: true }],
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
'react/jsx-one-expression-per-line': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-props-no-spreading': 'off',
'arrow-body-style': ['warn', 'as-needed'],
'no-param-reassign': ['error', { props: false }],
'import/prefer-default-export': 'off',
'import/no-cycle': 'off',
'no-console': 'error',
'eol-last': ['error', 'always'],
'no-debugger': 'error',
'no-nested-ternary': 'off',
'import/no-unresolved': 'off',
'import/extensions': ['error', 'never'],
'import/order': [
'error',
{
groups: ['external', ['sibling', 'parent', 'internal'], 'builtin', 'unknown'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
curly: ['error', 'all'],
'react/require-default-props': ['warn'],
'react/default-props-match-prop-types': ['warn']
},
}