This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
.eslintrc.js
executable file
·72 lines (72 loc) · 2.03 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
// see details:
// https://github.com/groupher/eslint-config-web/blob/master/index.js
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'@groupher/eslint-config-web',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
// see: https://stackoverflow.com/a/56696478/4050784
'plugin:import/typescript',
'plugin:@next/next/recommended',
],
// extends: ['@groupher/eslint-config-web'],
settings: {
// see if the import lib exsit or not
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
'babel-module': {},
'eslint-import-resolver-custom-alias': {
alias: {
'@/config': 'config',
'@/containers': 'src/containers',
'@/widgets': 'src/widgets',
'@/services': 'src/services',
'@/constant': 'utils/constant',
'@/hooks': 'src/hooks',
'@/hoc': 'src/hoc',
'@/stores': 'src/stores',
'@/model': 'src/stores/Model',
'@/utils': 'utils',
'@/schemas': 'src/schemas',
'@/Img': 'src/widgets/Img',
'@/SvgIcons': 'src/widgets/SvgIcons',
'@/icons': 'src/widgets/Icons',
'@/i18n': 'i18n',
'@/spec': 'src/spec',
},
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
'react/no-unknown-property': 0,
'no-extra-boolean-cast': 0,
'react/require-default-props': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/ban-ts-comment': 0,
'no-setter-return': 0,
'no-dupe-else-if': 0,
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [
2,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'import/no-named-as-default': 0,
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
}