This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.eslintrc.js
112 lines (111 loc) · 2.9 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
module.exports = {
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'plugin:storybook/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['react-hooks', 'immutable', 'import', '@typescript-eslint', 'prettier', 'react'],
settings: {
'import/resolver': {
node: {
paths: ['src']
}
},
react: {
version: 'detect'
}
},
overrides: [{
files: ['*.story.tsx'],
rules: {
'import/no-default-export': 0,
'@typescript-eslint/ban-ts-comment': 0
}
}, {
files: ['*.config.*'],
rules: {
'import/no-default-export': 0
}
}, {
files: ['**/pages/**'],
rules: {
'import/no-default-export': 0
}
}],
rules: {
'arrow-parens': 0,
'implicit-arrow-linebreak': 0,
'no-confusing-arrow': 0,
// 1,
'no-unused-vars': 0,
// 2,
'no-use-before-define': 0,
'object-curly-newline': 0,
'operator-linebreak': 1,
//
// import rules
//
'import/order': 0,
// 1,
// 'import/named': 2,
'import/no-default-export': 2,
'import/no-extraneous-dependencies': 1,
'import/no-unresolved': 0,
// 2,
'import/prefer-default-export': 0,
'no-restricted-imports': ['warn', {
paths: [{
name: '@storybook/react',
importNames: ['storiesOf'],
message: 'Please use the CSF (Component Story Format) API instead: https://storybook.js.org/docs/formats/component-story-format/'
}]
}],
//
// @typescript rules
//
'@typescript-eslint/array-type': 0,
// [1, 'array-simple'],
'@typescript-eslint/ban-ts-comment': 1,
'@typescript-eslint/indent': 0,
// ['warn', 2],
'@typescript-eslint/explicit-member-accessibility': 0,
// 2,
'@typescript-eslint/explicit-module-boundary-types': 0,
// 2
'@typescript-eslint/explicit-function-return-type': 0,
// 1,
'@typescript-eslint/no-explicit-any': 0,
// 2,
'@typescript-eslint/no-object-literal-type-assertion': 0,
'@typescript-eslint/no-require-imports': 1,
'@typescript-eslint/no-unused-vars': 0,
// 2,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/prefer-interface': 0,
//
// immutable rules
//
'immutable/no-let': 0,
// 1,
'immutable/no-this': 0,
// 1,
'immutable/no-mutation': 0,
// 1,
//
// react rules
//
'react/destructuring-assignment': 'warn',
'react/jsx-filename-extension': ['error', {
extensions: ['.tsx']
}],
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/display-name': 'off',
'react/jsx-key': 'warn',
'react/jsx-no-comment-textnodes': 'off',
'react/no-children-prop': 'off',
'react/no-unescaped-entities': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/no-unknown-property': ['error', {
ignore: ['css']
}]
}
};