-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
67 lines (67 loc) · 1.79 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
module.exports = {
globals: {
node: true,
browser: true,
es6: true,
},
extends: ['next/core-web-vitals', 'airbnb', 'airbnb/hooks', 'prettier'],
plugins: ['prettier', '@emotion'],
rules: {
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
},
],
'@emotion/pkg-renaming': 'error',
'@emotion/styled-import': 'error',
'@emotion/no-vanilla': 'error',
},
overrides: [
{
env: {
jest: true,
},
files: ['**/*.test.js?(x)', './__tests__/**/*.js?(x)'],
plugins: ['jest', 'testing-library', 'jest-dom'],
extends: ['plugin:testing-library/react', 'plugin:jest-dom/recommended', 'plugin:jest/all'],
rules: {
'jest/max-expects': 'off',
},
},
{
files: ['**/*.cy.js?(x)', './cypress/**/*.js?(x)', './cypress.config.js'],
plugins: ['cypress'],
extends: ['plugin:cypress/recommended'],
env: {
'cypress/globals': true,
},
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
{
files: ['**/*.stories.js?(x)'],
extends: ['plugin:storybook/recommended'],
rules: {
'import/no-extraneous-dependencies': 'off',
'react/function-component-definition': 'off',
'react/jsx-props-no-spreading': 'off',
'import/prefer-default-export': 'off',
'react/prop-types': 'off',
},
},
],
settings: {
'import/resolver': {
jsconfig: {
config: 'jsconfig.json',
extensions: ['.js', '.jsx'],
},
},
},
};