-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
62 lines (60 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
52
53
54
55
56
57
58
59
60
61
62
module.exports = {
extends: ['alloy', 'alloy/react', 'alloy/typescript'],
env: {
// Your environments (which contains several predefined global variables)
//
// browser: true,
// node: true,
// mocha: true,
jest: true,
// jquery: true
},
globals: {},
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
rules: {
'no-template-curly-in-string': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'import/prefer-default-export': 'off',
// 'import/no-default-export': 'error',
'import/no-anonymous-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
'react/react-in-jsx-scope': 'off',
'arrow-body-style': 'off',
'prefer-const': 'error',
'sort-imports': 'off',
'no-magic-numbers': 'error',
'require-await': 'error',
// 'no-console': 'error',
'no-unused-vars': 'error',
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'import/no-unresolved': ['off'],
'import/extensions': 'off',
},
overrides: [
{
files: ['pages/**', 'pages/api/**', 'global.d.ts', '*.wc.ts'],
rules: {
'import/no-default-export': 'off',
'import/prefer-default-export': 'error',
},
},
{
// or whatever matches stories specified in .storybook/main.js
files: ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
rules: {
// example of overriding a rule
'storybook/hierarchy-separator': 'error',
// example of disabling a rule
'storybook/default-exports': 'off',
'storybook/hierarchy-separator': 'off',
},
},
],
}