This repository was archived by the owner on Feb 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.eslintrc.js
70 lines (69 loc) · 2.19 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
const {
aliases
} = require('./package.json');
module.exports = {
env: {
browser: true,
node: true,
es6: true,
jest: true
},
extends: ["airbnb", "plugin:@typescript-eslint/recommended", "plugin:import/errors", "plugin:import/warnings", "plugin:import/typescript", "prettier", "plugin:storybook/recommended"],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
settings: {
'import/resolver': {
alias: {
map: Object.entries(aliases).map(item => {
item[1] = `./${item[1]}`;
return item;
}),
extensions: ['.ts', '.tsx', '.json', '.js']
}
}
},
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'react'],
rules: {
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/ban-types': ['off'],
'react/jsx-filename-extension': ['error', {
extensions: ['.tsx']
}],
'react/jsx-indent-props': ['error', 4],
'react/jsx-indent': ['error', 4],
'react/jsx-props-no-spreading': ['off'],
'react/prop-types': 'off',
'import/namespace': ['error', {
allowComputed: true
}],
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
camelcase: 'off',
'no-shadow': 'off',
'no-use-before-define': [0],
'array-callback-return': 'off',
'no-underscore-dangle': 'off',
'no-param-reassign': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'react/destructuring-assignment': 'off',
'no-console': 'off',
'import/no-named-as-default': 'off',
'no-alert': 'off',
indent: ['error', 4],
'react/require-default-props': 'off'
}
};