-
Notifications
You must be signed in to change notification settings - Fork 177
/
.eslintrc.js
41 lines (36 loc) · 1010 Bytes
/
.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
const { getESLintConfig, deepmerge } = require('@iceworks/spec');
const commonRules = {
// 'global-require': 0,
// 'import/no-dynamic-require': 0,
// 'react/jsx-filename-extension': 0,
// 'react/no-find-dom-node': 0,
// 'no-restricted-syntax': ['error', "BinaryExpression[operator='of']"],
// "react/self-closing-comp": 0,
// "import/newline-after-import": 0
};
const jsRules = deepmerge(getESLintConfig('react'), {
rules: {
...commonRules,
},
});
const tsRules = deepmerge(getESLintConfig('react-ts'), {
rules: {
...commonRules,
// '@typescript-eslint/array-type': ['error'],
// '@typescript-eslint/interface-name-prefix': 0,
// '@typescript-eslint/explicit-function-return-type': 0,
// '@typescript-eslint/no-extra-semi': 0,
// "@typescript-eslint/ban-types": 0,
'react/no-unused-prop-types': 0,
},
});
delete tsRules.root;
module.exports = {
...jsRules,
overrides: [
{
...tsRules,
files: ['**/*.ts', '**/*.tsx'],
},
],
};