-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
58 lines (55 loc) · 1.3 KB
/
eslint.config.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
import antfu from '@antfu/eslint-config'
import prettier from 'eslint-plugin-prettier'
import storybook from 'eslint-plugin-storybook'
const ignores = [
'*.md',
'**/*.md',
'*.yml',
'**/*.yml',
'*.toml',
'**/*.toml',
'.yarn/**',
'lib/client.es.js',
'graphql-operations.ts',
'**/graphql-operations.ts',
'Builder-Blocks/**',
'playground/generated',
'playground/generated/**',
'cli/encrypt-key.json',
'cli/styles-mapping.json',
'cli/handler/graphql-operations.ts',
'cli/block-mapping.ts',
'cli/block-mapping.json',
]
export default antfu(
{
ignores,
stylistic: false,
rules: {
'node/prefer-global/process': 'off',
'vue/html-self-closing': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-closing-bracket-newline': 'off',
'antfu/top-level-function': 'error',
},
},
{
ignores,
plugins: { prettier },
rules: {
'prettier/prettier': 'error',
},
},
{
files: ['**/*.stories.ts'],
plugins: { storybook },
rules: {
...storybook.configs.recommended.overrides[0].rules,
},
},
{
// config block that only contains ignores will work as global ignore, only global ignore can ignore directories
// ref: https://github.com/eslint/eslint/discussions/17429
ignores,
},
)