forked from HospitalRun/components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
71 lines (71 loc) · 2.23 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
module.exports = {
ignorePatterns: ['commitlint.config.js', 'stories/.eslintrc.js', '.eslintrc.js'],
env: {
browser: true,
es6: true,
'jest/globals': true,
},
extends: [
'airbnb',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json', './stories/tsconfig.json', './test/tsconfig.json'],
tsconfigRootDir: './',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
plugins: ['react', '@typescript-eslint', 'prettier', 'jest'],
rules: {
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: true }],
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
'import/extensions': 'off',
'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',
'no-console': 'off',
'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'],
'react/prop-types': ['warn']
},
}