-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy patheslint.config.js
94 lines (89 loc) · 2.91 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import antfu from '@antfu/eslint-config';
import { FlatCompat } from '@eslint/eslintrc';
const compat = new FlatCompat();
export default antfu(
{
stylistic: {
indent: 4,
semi: true,
},
ignores: [
'.vscode',
'out',
'node_modules',
'changelog',
],
yaml: false,
},
{
rules: {
'antfu/no-top-level-await': ['off'],
curly: ['error', 'all'],
'import/order': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'node/no-process-env': 'off',
'node/prefer-global/process': 'off',
'perfectionist/sort-imports': ['error', {
ignoreCase: true,
newlinesBetween: 'always',
order: 'asc',
tsconfigRootDir: '.',
type: 'alphabetical',
groups: [
'external-type',
'builtin-type',
'internal-type',
'parent-type',
'sibling-type',
'index-type',
'external',
'builtin',
'internal',
['parent', 'sibling'],
'index',
],
internalPattern: ['^#'],
}],
'perfectionist/sort-classes': ['error', {
ignoreCase: true,
order: 'asc',
type: 'alphabetical',
groups: [
'index-signature',
'static-property',
'static-block',
['protected-property', 'protected-accessor-property'],
['private-property', 'private-accessor-property'],
['property', 'accessor-property'],
'constructor',
'static-method',
'protected-method',
'private-method',
'method',
['get-method', 'set-method'],
'unknown',
],
}],
'style/brace-style': ['error', '1tbs'],
'style/comma-dangle': ['error', 'always-multiline'],
'style/eol-last': ['error', 'always'],
'style/linebreak-style': ['error', 'unix'],
'style/quote-props': ['error', 'as-needed'],
'style/quotes': ['error', 'single', { avoidEscape: true }],
'ts/consistent-type-definitions': 'off',
'unused-imports/no-unused-imports': 'warn',
},
},
...compat.config({
extends: ['plugin:tailwindcss/recommended'],
rules: {
'tailwindcss/no-custom-classname': 'off',
},
ignorePatterns: [
'.vscode',
'out',
'node_modules',
'changelog',
],
}),
);