-
Notifications
You must be signed in to change notification settings - Fork 119
/
.eslintrc.js
51 lines (51 loc) · 1.71 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
module.exports = {
root: true,
ignorePatterns: ['src/generated/**/*'],
extends: ['@storybook/eslint-config-storybook', 'plugin:storybook/recommended'],
rules: {
'import/extensions': [
'error',
'never',
{ ignorePackages: true, md: 'always', svg: 'always', json: 'always', tag: 'always' },
],
'no-use-before-define': 'off',
'import/no-unresolved': ['error', { ignore: ['@storybook'] }],
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-fragments': 'off',
'react/prop-types': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/return-await': 'off',
'eslint-comments/disable-enable-pair': 'off',
'react/display-name': 'off',
'eslint-comments/no-unlimited-disable': 'off',
'storybook/hierarchy-separator': 'off',
'react/sort-comp': [
'error',
{
order: [
'staticLifecycle',
'static-methods',
'instance-variables',
'lifecycle',
'/^on.+$/',
'/^(get|set)(?!(DerivedStateFromProps|SnapshotBeforeUpdate$)).+$/',
'instance-methods',
'instance-variables',
'everything-else',
'render',
],
groups: {
staticLifecycle: ['displayName', 'propTypes', 'defaultProps', 'getDerivedStateFromProps'],
},
},
],
'max-classes-per-file': 'off',
},
};