-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
150 lines (150 loc) · 4.13 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
env: {
browser: true,
},
plugins: ['babel', 'react', '@typescript-eslint', 'typescript-sort-keys', 'prettier'],
extends: [
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
'prettier',
],
rules: {
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error', { ignoreTypeValueShadow: true }],
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-unused-vars': 2,
'brace-style': [2, '1tbs'],
curly: [2, 'all'],
'import/extensions': [
2,
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/no-extraneous-dependencies': 0,
'import/no-named-as-default': 0,
'import/order': 0,
'import/prefer-default-export': 0,
'no-multiple-empty-lines': [
2,
{
max: 1,
maxBOF: 0,
maxEOF: 0,
},
],
'object-property-newline': [
2,
{
allowAllPropertiesOnSameLine: false,
},
],
'padding-line-between-statements': [
2,
{
blankLine: 'always',
prev: [
'case',
'multiline-block-like',
'multiline-const',
'multiline-expression',
'multiline-let',
'multiline-var',
],
next: '*',
},
{
blankLine: 'always',
prev: '*',
next: [
'multiline-block-like',
'multiline-const',
'multiline-expression',
'multiline-let',
'multiline-var',
'return',
],
},
],
'prettier/prettier': 2,
'react/jsx-curly-brace-presence': 0,
'react/jsx-filename-extension': [
2,
{
extensions: ['.tsx'],
},
],
'react/jsx-indent-props': [2, 4],
'react/jsx-key': [
2,
{
checkFragmentShorthand: true,
},
],
'react/jsx-no-literals': [
2,
{
noStrings: false,
},
],
'react/jsx-no-useless-fragment': 2,
'react/jsx-props-no-spreading': 0,
'react/jsx-sort-default-props': [
2,
{
ignoreCase: false,
},
],
'react/jsx-sort-props': [
2,
{
callbacksLast: false,
ignoreCase: false,
noSortAlphabetically: false,
reservedFirst: false,
shorthandFirst: false,
shorthandLast: false,
},
],
'react/prop-types': 0,
'react/require-default-props': [0, { forbidDefaultForRequired: true, ignoreFunctionalComponents: false }],
'sort-imports': [
2,
{
ignoreCase: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'sort-keys': [
2,
'asc',
{
caseSensitive: true,
natural: false,
},
],
'typescript-sort-keys/interface': 2,
'typescript-sort-keys/string-enum': 2,
},
overrides: [
{
files: ['*.stories.tsx'],
rules: {
'no-console': 'off',
},
},
],
};