forked from storybookjs/storybook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (53 loc) · 1.36 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
module.exports = {
root: true,
extends: ['@storybook/eslint-config-storybook'],
overrides: [
{
files: [
'**/__tests__/**',
'scripts/**',
'**/__testfixtures__/**',
'**/*.test.*',
'**/*.stories.*',
'**/storyshots/**/stories/**',
'docs/src/new-components/lib/StoryLinkWrapper.js',
'docs/src/stories/**',
],
rules: {
'@typescript-eslint/no-empty-function': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
{
files: ['**/__testfixtures__/**'],
rules: {
'react/forbid-prop-types': 'off',
'react/no-unused-prop-types': 'off',
'react/require-default-props': 'off',
},
},
{ files: '**/.storybook/config.js', rules: { 'global-require': 'off' } },
{ files: 'cypress/**', rules: { 'jest/expect-expect': 'off' } },
{
files: ['**/*.stories.*'],
rules: {
'no-console': 'off',
},
},
{
files: ['**/*.tsx', '**/*.ts'],
rules: {
'react/prop-types': 'off', // we should use types
'no-dupe-class-members': 'off', // this is called overloads in typescript
},
},
{
files: ['**/*.d.ts'],
rules: {
'vars-on-top': 'off',
'no-var': 'off', // this is how typescript works
'spaced-comment': 'off',
},
},
],
};