-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
eslint.config.js
62 lines (61 loc) · 1.61 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
59
60
61
62
// @ts-check
import antfu from '@antfu/eslint-config'
export default antfu(
{
ignores: [
// line split
'**/*.ts.timestamp*',
'nuxt',
],
rules: {
'symbol-description': 'off',
'node/prefer-global/process': 'off',
'no-control-regex': 'off',
'curly': ['error', 'multi-line'],
'antfu/if-newline': 'off',
'style/brace-style': ['error', '1tbs'],
'antfu/top-level-function': 'off',
'test/prefer-lowercase-title': 'off',
'style/yield-star-spacing': ['error', 'before'],
'style/arrow-parens': ['error', 'always'],
'no-console': 'warn',
'style/indent': 'off',
'style/indent-binary-ops': 'off',
'ts/no-use-before-define': 'off',
'perfectionist/sort-imports': 'off',
'perfectionist/sort-named-imports': 'off',
'perfectionist/sort-exports': 'off',
'unused-imports/no-unused-imports': 'warn',
// NOTE: initially came from 'eslint-plugin-import-newlines' but the indent is off
// since I preffer the one added by prettier
// 'import-newlines/enforce': [
// 'error',
// {
// 'max-len': 100,
// 'items': 3,
// },
// ],
},
},
{
files: ['playground/**/*'],
rules: {
'no-console': 'off',
},
},
{
files: ['docs/**/*', '!docs/.vitepress/**/*'],
rules: {
'import/order': ['off'],
'unused-imports/no-unused-imports': 'off',
'no-console': 'off',
'node/handle-callback-err': 'off',
},
},
{
files: ['**/*.spec.ts'],
rules: {
'unicorn/consistent-function-scoping': 'off',
},
},
)