-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
77 lines (74 loc) · 2.28 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
import antfu from '@antfu/eslint-config';
import {FlatCompat} from '@eslint/eslintrc';
const compat = new FlatCompat();
/**
* @file ESLint configuration
* @description extendable ESLint configuration based on @antfu/eslint-config
* @see https://github.com/antfu/eslint-config
*/
export default antfu(
{
stylistic: {
indent: 4,
quotes: 'single',
semi: true,
},
},
// Legacy config - see https://github.com/antfu/eslint-config?tab=readme-ov-file#usage
...compat.config({
extends: ['plugin:tailwindcss/recommended'],
rules: {
'tailwindcss/no-custom-classname': 'off',
'tailwindcss/migration-from-tailwind-2': 'off',
},
}),
{
rules: {
curly: ['error', 'all'],
'import/order': ['error', {
groups: [
'index',
'sibling',
'parent',
'internal',
'external',
'builtin',
'object',
'type',
],
'newlines-between': 'never',
alphabetize: {
order: 'asc',
},
}],
'node/prefer-global/process': 0,
'style/block-spacing': ['error', 'never'],
'style/brace-style': ['error', '1tbs'],
'style/object-curly-spacing': ['error', 'never'],
'style/quote-props': ['error', 'as-needed'],
'vue/attributes-order': ['error', {
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
'UNIQUE',
'SLOT',
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'ATTR_DYNAMIC',
'ATTR_STATIC',
'ATTR_SHORTHAND_BOOL',
'EVENTS',
'CONTENT',
],
alphabetical: true,
}],
'vue/max-attributes-per-line': ['error', {
singleline: 1,
multiline: 1,
}],
},
},
);