@kikiutils/eslint-config 4.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.d.ts +7 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +182 -0
- package/dist/base.js.map +1 -0
- package/dist/style.d.ts +7 -0
- package/dist/style.d.ts.map +1 -0
- package/dist/style.js +27 -0
- package/dist/style.js.map +1 -0
- package/dist/vue.d.ts +7 -0
- package/dist/vue.d.ts.map +1 -0
- package/dist/vue.js +63 -0
- package/dist/vue.js.map +1 -0
- package/package.json +32 -30
- package/src/{index.ts → base.ts} +2 -127
- package/src/style.ts +30 -0
- package/src/vue.ts +79 -0
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -266
- package/dist/index.js.map +0 -1
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","names":[],"sources":["../src/base.ts"],"sourcesContent":[],"mappings":";;;iBASgB,iBAAA,gCAAyD"}
|
package/dist/base.js
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import promise from "eslint-plugin-promise";
|
|
2
|
+
|
|
3
|
+
//#region src/base.ts
|
|
4
|
+
const basePerfectionistSortOptions = {
|
|
5
|
+
ignoreCase: false,
|
|
6
|
+
type: "natural"
|
|
7
|
+
};
|
|
8
|
+
function createBaseConfigs(environment = "node") {
|
|
9
|
+
return [{
|
|
10
|
+
files: ["**/*.{cjs,js,mjs,ts,tsx,vue}"],
|
|
11
|
+
plugins: { promise },
|
|
12
|
+
rules: {
|
|
13
|
+
"antfu/consistent-list-newline": ["error", {
|
|
14
|
+
ArrayExpression: false,
|
|
15
|
+
ArrayPattern: false
|
|
16
|
+
}],
|
|
17
|
+
"antfu/curly": "off",
|
|
18
|
+
"antfu/if-newline": "off",
|
|
19
|
+
"antfu/no-top-level-await": "off",
|
|
20
|
+
"curly": ["error", "multi-line"],
|
|
21
|
+
"max-classes-per-file": ["error", 1],
|
|
22
|
+
"no-promise-executor-return": ["error", { allowVoid: true }],
|
|
23
|
+
"node/prefer-global/process": ["error", "always"],
|
|
24
|
+
"perfectionist/sort-array-includes": ["error", basePerfectionistSortOptions],
|
|
25
|
+
"perfectionist/sort-enums": ["error", basePerfectionistSortOptions],
|
|
26
|
+
"perfectionist/sort-heritage-clauses": ["error", {
|
|
27
|
+
ignoreCase: false,
|
|
28
|
+
type: "natural"
|
|
29
|
+
}],
|
|
30
|
+
"perfectionist/sort-imports": ["error", {
|
|
31
|
+
environment,
|
|
32
|
+
groups: [
|
|
33
|
+
"side-effect",
|
|
34
|
+
"side-effect-style",
|
|
35
|
+
"style",
|
|
36
|
+
["builtin", "builtin-type"],
|
|
37
|
+
["external", "external-type"],
|
|
38
|
+
["internal", "internal-type"],
|
|
39
|
+
["parent", "parent-type"],
|
|
40
|
+
["sibling", "sibling-type"],
|
|
41
|
+
["index", "index-type"],
|
|
42
|
+
"object",
|
|
43
|
+
"unknown"
|
|
44
|
+
],
|
|
45
|
+
ignoreCase: false,
|
|
46
|
+
internalPattern: [
|
|
47
|
+
"^#.*",
|
|
48
|
+
"^@/.*",
|
|
49
|
+
"^~/.*"
|
|
50
|
+
],
|
|
51
|
+
type: "natural"
|
|
52
|
+
}],
|
|
53
|
+
"perfectionist/sort-interfaces": ["error", basePerfectionistSortOptions],
|
|
54
|
+
"perfectionist/sort-intersection-types": ["error", basePerfectionistSortOptions],
|
|
55
|
+
"perfectionist/sort-maps": ["error", basePerfectionistSortOptions],
|
|
56
|
+
"perfectionist/sort-modules": ["error", {
|
|
57
|
+
...basePerfectionistSortOptions,
|
|
58
|
+
groups: [
|
|
59
|
+
"declare-type",
|
|
60
|
+
["export-type", "type"],
|
|
61
|
+
"declare-interface",
|
|
62
|
+
["export-interface", "interface"],
|
|
63
|
+
"declare-enum",
|
|
64
|
+
["enum", "export-enum"],
|
|
65
|
+
"declare-class",
|
|
66
|
+
["class", "export-class"],
|
|
67
|
+
"declare-function",
|
|
68
|
+
["export-function", "function"]
|
|
69
|
+
]
|
|
70
|
+
}],
|
|
71
|
+
"perfectionist/sort-object-types": ["error", basePerfectionistSortOptions],
|
|
72
|
+
"perfectionist/sort-objects": ["error", basePerfectionistSortOptions],
|
|
73
|
+
"perfectionist/sort-sets": ["error", basePerfectionistSortOptions],
|
|
74
|
+
"perfectionist/sort-switch-case": ["error", {
|
|
75
|
+
ignoreCase: false,
|
|
76
|
+
type: "natural"
|
|
77
|
+
}],
|
|
78
|
+
"perfectionist/sort-union-types": ["error", basePerfectionistSortOptions],
|
|
79
|
+
"perfectionist/sort-variable-declarations": ["error", basePerfectionistSortOptions],
|
|
80
|
+
"promise/no-multiple-resolved": "error",
|
|
81
|
+
"promise/no-return-in-finally": "error",
|
|
82
|
+
"promise/no-return-wrap": "error",
|
|
83
|
+
"require-await": "error",
|
|
84
|
+
"style/array-bracket-newline": ["error", { multiline: true }],
|
|
85
|
+
"style/array-element-newline": ["error", {
|
|
86
|
+
ArrayExpression: {
|
|
87
|
+
consistent: true,
|
|
88
|
+
minItems: 2
|
|
89
|
+
},
|
|
90
|
+
ArrayPattern: { minItems: 3 }
|
|
91
|
+
}],
|
|
92
|
+
"style/arrow-parens": ["error", "always"],
|
|
93
|
+
"style/brace-style": [
|
|
94
|
+
"error",
|
|
95
|
+
"1tbs",
|
|
96
|
+
{ allowSingleLine: false }
|
|
97
|
+
],
|
|
98
|
+
"style/function-call-spacing": ["error", "never"],
|
|
99
|
+
"style/indent": ["error", 4],
|
|
100
|
+
"style/max-len": ["warn", {
|
|
101
|
+
code: 120,
|
|
102
|
+
comments: 120
|
|
103
|
+
}],
|
|
104
|
+
"style/member-delimiter-style": ["error", { multiline: {
|
|
105
|
+
delimiter: "semi",
|
|
106
|
+
requireLast: true
|
|
107
|
+
} }],
|
|
108
|
+
"style/no-extra-parens": [
|
|
109
|
+
"error",
|
|
110
|
+
"all",
|
|
111
|
+
{ nestedBinaryExpressions: false }
|
|
112
|
+
],
|
|
113
|
+
"style/no-extra-semi": "error",
|
|
114
|
+
"style/object-curly-newline": ["error", {
|
|
115
|
+
ExportDeclaration: {
|
|
116
|
+
minProperties: 2,
|
|
117
|
+
multiline: true
|
|
118
|
+
},
|
|
119
|
+
ImportDeclaration: {
|
|
120
|
+
minProperties: 2,
|
|
121
|
+
multiline: true
|
|
122
|
+
},
|
|
123
|
+
ObjectExpression: {
|
|
124
|
+
minProperties: 2,
|
|
125
|
+
multiline: true
|
|
126
|
+
},
|
|
127
|
+
ObjectPattern: {
|
|
128
|
+
minProperties: 3,
|
|
129
|
+
multiline: true
|
|
130
|
+
}
|
|
131
|
+
}],
|
|
132
|
+
"style/operator-linebreak": [
|
|
133
|
+
"error",
|
|
134
|
+
"before",
|
|
135
|
+
{ overrides: { "=": "after" } }
|
|
136
|
+
],
|
|
137
|
+
"style/padding-line-between-statements": [
|
|
138
|
+
"error",
|
|
139
|
+
{
|
|
140
|
+
blankLine: "always",
|
|
141
|
+
next: [
|
|
142
|
+
"class",
|
|
143
|
+
"enum",
|
|
144
|
+
"function"
|
|
145
|
+
],
|
|
146
|
+
prev: "*"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
blankLine: "always",
|
|
150
|
+
next: "*",
|
|
151
|
+
prev: ["class", "function"]
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"style/semi": ["error", "always"],
|
|
155
|
+
"ts/consistent-generic-constructors": ["error", "constructor"],
|
|
156
|
+
"ts/no-redeclare": "off"
|
|
157
|
+
}
|
|
158
|
+
}, {
|
|
159
|
+
files: ["**/.vscode/*.json"],
|
|
160
|
+
rules: {
|
|
161
|
+
"jsonc/sort-array-values": ["error", {
|
|
162
|
+
order: {
|
|
163
|
+
natural: true,
|
|
164
|
+
type: "asc"
|
|
165
|
+
},
|
|
166
|
+
pathPattern: "^.*$"
|
|
167
|
+
}],
|
|
168
|
+
"jsonc/sort-keys": [
|
|
169
|
+
"error",
|
|
170
|
+
"asc",
|
|
171
|
+
{
|
|
172
|
+
caseSensitive: true,
|
|
173
|
+
natural: true
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
}];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
//#endregion
|
|
181
|
+
export { createBaseConfigs };
|
|
182
|
+
//# sourceMappingURL=base.js.map
|
package/dist/base.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","names":[],"sources":["../src/base.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\n// @ts-expect-error No declare file.\nimport promise from 'eslint-plugin-promise';\n\nconst basePerfectionistSortOptions = {\n ignoreCase: false,\n type: 'natural',\n} as const;\n\nexport function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFlatConfigItem[] {\n return [\n {\n files: ['**/*.{cjs,js,mjs,ts,tsx,vue}'],\n plugins: { promise },\n rules: {\n 'antfu/consistent-list-newline': [\n 'error',\n {\n ArrayExpression: false,\n ArrayPattern: false,\n },\n ],\n 'antfu/curly': 'off',\n 'antfu/if-newline': 'off',\n 'antfu/no-top-level-await': 'off',\n 'curly': [\n 'error',\n 'multi-line',\n ],\n 'max-classes-per-file': [\n 'error',\n 1,\n ],\n 'no-promise-executor-return': [\n 'error',\n { allowVoid: true },\n ],\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n 'perfectionist/sort-array-includes': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-enums': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-heritage-clauses': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-imports': [\n 'error',\n {\n environment,\n groups: [\n 'side-effect',\n 'side-effect-style',\n 'style',\n [\n 'builtin',\n 'builtin-type',\n ],\n [\n 'external',\n 'external-type',\n ],\n [\n 'internal',\n 'internal-type',\n ],\n [\n 'parent',\n 'parent-type',\n ],\n [\n 'sibling',\n 'sibling-type',\n ],\n [\n 'index',\n 'index-type',\n ],\n 'object',\n 'unknown',\n ],\n ignoreCase: false,\n internalPattern: [\n '^#.*',\n '^@/.*',\n '^~/.*',\n ],\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-intersection-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-maps': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-modules': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n groups: [\n 'declare-type',\n [\n 'export-type',\n 'type',\n ],\n 'declare-interface',\n [\n 'export-interface',\n 'interface',\n ],\n 'declare-enum',\n [\n 'enum',\n 'export-enum',\n ],\n 'declare-class',\n [\n 'class',\n 'export-class',\n ],\n 'declare-function',\n [\n 'export-function',\n 'function',\n ],\n ],\n },\n ],\n 'perfectionist/sort-object-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-objects': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-sets': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-switch-case': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-union-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-variable-declarations': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'require-await': 'error',\n 'style/array-bracket-newline': [\n 'error',\n { multiline: true },\n ],\n 'style/array-element-newline': [\n 'error',\n {\n ArrayExpression: {\n consistent: true,\n minItems: 2,\n },\n ArrayPattern: { minItems: 3 },\n },\n ],\n 'style/arrow-parens': [\n 'error',\n 'always',\n ],\n 'style/brace-style': [\n 'error',\n '1tbs',\n { allowSingleLine: false },\n ],\n 'style/function-call-spacing': [\n 'error',\n 'never',\n ],\n 'style/indent': [\n 'error',\n 4,\n ],\n 'style/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n },\n ],\n 'style/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true,\n },\n },\n ],\n 'style/no-extra-parens': [\n 'error',\n 'all',\n { nestedBinaryExpressions: false },\n ],\n 'style/no-extra-semi': 'error',\n 'style/object-curly-newline': [\n 'error',\n {\n ExportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ImportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ObjectExpression: {\n minProperties: 2,\n multiline: true,\n },\n ObjectPattern: {\n minProperties: 3,\n multiline: true,\n },\n },\n ],\n 'style/operator-linebreak': [\n 'error',\n 'before',\n { overrides: { '=': 'after' } },\n ],\n 'style/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: [\n 'class',\n 'enum',\n 'function',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n next: '*',\n prev: [\n 'class',\n 'function',\n ],\n },\n ],\n 'style/semi': [\n 'error',\n 'always',\n ],\n 'ts/consistent-generic-constructors': [\n 'error',\n 'constructor',\n ],\n 'ts/no-redeclare': 'off',\n },\n },\n {\n files: ['**/.vscode/*.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: {\n natural: true,\n type: 'asc',\n },\n pathPattern: '^.*$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: true,\n natural: true,\n },\n ],\n },\n },\n ];\n}\n"],"mappings":";;;AAIA,MAAM,+BAA+B;CACjC,YAAY;CACZ,MAAM;CACT;AAED,SAAgB,kBAAkB,cAA8B,QAA+B;AAC3F,QAAO,CACH;EACI,OAAO,CAAC,+BAA+B;EACvC,SAAS,EAAE,SAAS;EACpB,OAAO;GACH,iCAAiC,CAC7B,SACA;IACI,iBAAiB;IACjB,cAAc;IACjB,CACJ;GACD,eAAe;GACf,oBAAoB;GACpB,4BAA4B;GAC5B,SAAS,CACL,SACA,aACH;GACD,wBAAwB,CACpB,SACA,EACH;GACD,8BAA8B,CAC1B,SACA,EAAE,WAAW,MAAM,CACtB;GACD,8BAA8B,CAC1B,SACA,SACH;GACD,qCAAqC,CACjC,SACA,6BACH;GACD,4BAA4B,CACxB,SACA,6BACH;GACD,uCAAuC,CACnC,SACA;IACI,YAAY;IACZ,MAAM;IACT,CACJ;GACD,8BAA8B,CAC1B,SACA;IACI;IACA,QAAQ;KACJ;KACA;KACA;KACA,CACI,WACA,eACH;KACD,CACI,YACA,gBACH;KACD,CACI,YACA,gBACH;KACD,CACI,UACA,cACH;KACD,CACI,WACA,eACH;KACD,CACI,SACA,aACH;KACD;KACA;KACH;IACD,YAAY;IACZ,iBAAiB;KACb;KACA;KACA;KACH;IACD,MAAM;IACT,CACJ;GACD,iCAAiC,CAC7B,SACA,6BACH;GACD,yCAAyC,CACrC,SACA,6BACH;GACD,2BAA2B,CACvB,SACA,6BACH;GACD,8BAA8B,CAC1B,SACA;IACI,GAAG;IACH,QAAQ;KACJ;KACA,CACI,eACA,OACH;KACD;KACA,CACI,oBACA,YACH;KACD;KACA,CACI,QACA,cACH;KACD;KACA,CACI,SACA,eACH;KACD;KACA,CACI,mBACA,WACH;KACJ;IACJ,CACJ;GACD,mCAAmC,CAC/B,SACA,6BACH;GACD,8BAA8B,CAC1B,SACA,6BACH;GACD,2BAA2B,CACvB,SACA,6BACH;GACD,kCAAkC,CAC9B,SACA;IACI,YAAY;IACZ,MAAM;IACT,CACJ;GACD,kCAAkC,CAC9B,SACA,6BACH;GACD,4CAA4C,CACxC,SACA,6BACH;GACD,gCAAgC;GAChC,gCAAgC;GAChC,0BAA0B;GAC1B,iBAAiB;GACjB,+BAA+B,CAC3B,SACA,EAAE,WAAW,MAAM,CACtB;GACD,+BAA+B,CAC3B,SACA;IACI,iBAAiB;KACb,YAAY;KACZ,UAAU;KACb;IACD,cAAc,EAAE,UAAU,GAAG;IAChC,CACJ;GACD,sBAAsB,CAClB,SACA,SACH;GACD,qBAAqB;IACjB;IACA;IACA,EAAE,iBAAiB,OAAO;IAC7B;GACD,+BAA+B,CAC3B,SACA,QACH;GACD,gBAAgB,CACZ,SACA,EACH;GACD,iBAAiB,CACb,QACA;IACI,MAAM;IACN,UAAU;IACb,CACJ;GACD,gCAAgC,CAC5B,SACA,EACI,WAAW;IACP,WAAW;IACX,aAAa;IAChB,EACJ,CACJ;GACD,yBAAyB;IACrB;IACA;IACA,EAAE,yBAAyB,OAAO;IACrC;GACD,uBAAuB;GACvB,8BAA8B,CAC1B,SACA;IACI,mBAAmB;KACf,eAAe;KACf,WAAW;KACd;IACD,mBAAmB;KACf,eAAe;KACf,WAAW;KACd;IACD,kBAAkB;KACd,eAAe;KACf,WAAW;KACd;IACD,eAAe;KACX,eAAe;KACf,WAAW;KACd;IACJ,CACJ;GACD,4BAA4B;IACxB;IACA;IACA,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE;IAClC;GACD,yCAAyC;IACrC;IACA;KACI,WAAW;KACX,MAAM;MACF;MACA;MACA;MACH;KACD,MAAM;KACT;IACD;KACI,WAAW;KACX,MAAM;KACN,MAAM,CACF,SACA,WACH;KACJ;IACJ;GACD,cAAc,CACV,SACA,SACH;GACD,sCAAsC,CAClC,SACA,cACH;GACD,mBAAmB;GACtB;EACJ,EACD;EACI,OAAO,CAAC,oBAAoB;EAC5B,OAAO;GACH,2BAA2B,CACvB,SACA;IACI,OAAO;KACH,SAAS;KACT,MAAM;KACT;IACD,aAAa;IAChB,CACJ;GACD,mBAAmB;IACf;IACA;IACA;KACI,eAAe;KACf,SAAS;KACZ;IACJ;GACJ;EACJ,CACJ"}
|
package/dist/style.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","names":[],"sources":["../src/style.ts"],"sourcesContent":[],"mappings":";;;iBAuBgB,uBAAA,CAAA,GAA2B"}
|
package/dist/style.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import format from "eslint-plugin-format";
|
|
2
|
+
|
|
3
|
+
//#region src/style.ts
|
|
4
|
+
function createPrettierCssConfig(parser) {
|
|
5
|
+
return {
|
|
6
|
+
files: [`**/*.${parser}`],
|
|
7
|
+
languageOptions: { parser: format.parserPlain },
|
|
8
|
+
plugins: { format },
|
|
9
|
+
rules: { "format/prettier": ["error", {
|
|
10
|
+
parser,
|
|
11
|
+
printWidth: 120,
|
|
12
|
+
singleQuote: true,
|
|
13
|
+
tabWidth: 4
|
|
14
|
+
}] }
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function createStyleFilesConfigs() {
|
|
18
|
+
return [
|
|
19
|
+
createPrettierCssConfig("css"),
|
|
20
|
+
createPrettierCssConfig("sass"),
|
|
21
|
+
createPrettierCssConfig("scss")
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { createStyleFilesConfigs };
|
|
27
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","names":[],"sources":["../src/style.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\n// @ts-expect-error Ignore this error.\nimport format from 'eslint-plugin-format';\n\nfunction createPrettierCssConfig(parser: 'css' | 'sass' | 'scss'): TypedFlatConfigItem {\n return {\n files: [`**/*.${parser}`],\n languageOptions: { parser: format.parserPlain },\n plugins: { format },\n rules: {\n 'format/prettier': [\n 'error',\n {\n parser,\n printWidth: 120,\n singleQuote: true,\n tabWidth: 4,\n },\n ],\n },\n };\n}\n\nexport function createStyleFilesConfigs(): TypedFlatConfigItem[] {\n return [\n createPrettierCssConfig('css'),\n createPrettierCssConfig('sass'),\n createPrettierCssConfig('scss'),\n ];\n}\n"],"mappings":";;;AAIA,SAAS,wBAAwB,QAAsD;AACnF,QAAO;EACH,OAAO,CAAC,QAAQ,SAAS;EACzB,iBAAiB,EAAE,QAAQ,OAAO,aAAa;EAC/C,SAAS,EAAE,QAAQ;EACnB,OAAO,EACH,mBAAmB,CACf,SACA;GACI;GACA,YAAY;GACZ,aAAa;GACb,UAAU;GACb,CACJ,EACJ;EACJ;;AAGL,SAAgB,0BAAiD;AAC7D,QAAO;EACH,wBAAwB,MAAM;EAC9B,wBAAwB,OAAO;EAC/B,wBAAwB,OAAO;EAClC"}
|
package/dist/vue.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.d.ts","names":[],"sources":["../src/vue.ts"],"sourcesContent":[],"mappings":";;;iBAQgB,eAAA,CAAA,GAAmB"}
|
package/dist/vue.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import kikiutilsTailwindcss from "@kikiutils/eslint-plugin-tailwindcss";
|
|
2
|
+
import kikiutilsEslintPluginVue from "@kikiutils/eslint-plugin-vue";
|
|
3
|
+
import tailwindcss from "eslint-plugin-tailwindcss";
|
|
4
|
+
|
|
5
|
+
//#region src/vue.ts
|
|
6
|
+
function createVueConfig() {
|
|
7
|
+
return {
|
|
8
|
+
files: ["**/*.vue"],
|
|
9
|
+
plugins: {
|
|
10
|
+
"@kikiutils/tailwindcss": kikiutilsTailwindcss,
|
|
11
|
+
"@kikiutils/vue": kikiutilsEslintPluginVue,
|
|
12
|
+
tailwindcss
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
"@kikiutils/tailwindcss/classnames-order": "error",
|
|
16
|
+
"@kikiutils/vue/attributes-order": ["error", { alphabetical: true }],
|
|
17
|
+
"@kikiutils/vue/no-extra-space-in-class": "error",
|
|
18
|
+
"style/max-len": "off",
|
|
19
|
+
"tailwindcss/classnames-order": "off",
|
|
20
|
+
"tailwindcss/enforces-negative-arbitrary-values": "error",
|
|
21
|
+
"tailwindcss/enforces-shorthand": "error",
|
|
22
|
+
"tailwindcss/no-unnecessary-arbitrary-value": "error",
|
|
23
|
+
"vue/attribute-hyphenation": "error",
|
|
24
|
+
"vue/attributes-order": "off",
|
|
25
|
+
"vue/block-order": ["error", { order: [
|
|
26
|
+
"template",
|
|
27
|
+
"script",
|
|
28
|
+
"style"
|
|
29
|
+
] }],
|
|
30
|
+
"vue/component-api-style": "error",
|
|
31
|
+
"vue/define-emits-declaration": "error",
|
|
32
|
+
"vue/define-props-declaration": "error",
|
|
33
|
+
"vue/enforce-style-attribute": "error",
|
|
34
|
+
"vue/html-closing-bracket-newline": "error",
|
|
35
|
+
"vue/html-closing-bracket-spacing": "error",
|
|
36
|
+
"vue/html-indent": ["error", 4],
|
|
37
|
+
"vue/max-attributes-per-line": ["error", {
|
|
38
|
+
multiline: 1,
|
|
39
|
+
singleline: 1
|
|
40
|
+
}],
|
|
41
|
+
"vue/max-len": ["warn", {
|
|
42
|
+
code: 120,
|
|
43
|
+
comments: 120,
|
|
44
|
+
template: 120
|
|
45
|
+
}],
|
|
46
|
+
"vue/no-dupe-keys": "error",
|
|
47
|
+
"vue/no-lone-template": "error",
|
|
48
|
+
"vue/no-multi-spaces": "error",
|
|
49
|
+
"vue/no-multiple-objects-in-class": "error",
|
|
50
|
+
"vue/no-root-v-if": "error",
|
|
51
|
+
"vue/no-template-target-blank": "error",
|
|
52
|
+
"vue/no-v-html": "error",
|
|
53
|
+
"vue/prefer-define-options": "error",
|
|
54
|
+
"vue/prefer-separate-static-class": "error",
|
|
55
|
+
"vue/require-explicit-emits": "error",
|
|
56
|
+
"vue/require-typed-ref": "error"
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { createVueConfig };
|
|
63
|
+
//# sourceMappingURL=vue.js.map
|
package/dist/vue.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.js","names":[],"sources":["../src/vue.ts"],"sourcesContent":["import type { TypedFlatConfigItem } from '@antfu/eslint-config';\n// @ts-expect-error No declare file.\nimport kikiutilsTailwindcss from '@kikiutils/eslint-plugin-tailwindcss';\n// @ts-expect-error Ignore this error.\nimport kikiutilsEslintPluginVue from '@kikiutils/eslint-plugin-vue';\n// @ts-expect-error No declare file.\nimport tailwindcss from 'eslint-plugin-tailwindcss';\n\nexport function createVueConfig(): TypedFlatConfigItem {\n return {\n files: ['**/*.vue'],\n plugins: {\n '@kikiutils/tailwindcss': kikiutilsTailwindcss,\n '@kikiutils/vue': kikiutilsEslintPluginVue,\n tailwindcss,\n },\n rules: {\n '@kikiutils/tailwindcss/classnames-order': 'error',\n '@kikiutils/vue/attributes-order': [\n 'error',\n { alphabetical: true },\n ],\n '@kikiutils/vue/no-extra-space-in-class': 'error',\n 'style/max-len': 'off',\n 'tailwindcss/classnames-order': 'off',\n 'tailwindcss/enforces-negative-arbitrary-values': 'error',\n 'tailwindcss/enforces-shorthand': 'error',\n 'tailwindcss/no-unnecessary-arbitrary-value': 'error',\n 'vue/attribute-hyphenation': 'error',\n 'vue/attributes-order': 'off',\n 'vue/block-order': [\n 'error',\n {\n order: [\n 'template',\n 'script',\n 'style',\n ],\n },\n ],\n 'vue/component-api-style': 'error',\n 'vue/define-emits-declaration': 'error',\n 'vue/define-props-declaration': 'error',\n 'vue/enforce-style-attribute': 'error',\n 'vue/html-closing-bracket-newline': 'error',\n 'vue/html-closing-bracket-spacing': 'error',\n 'vue/html-indent': [\n 'error',\n 4,\n ],\n 'vue/max-attributes-per-line': [\n 'error',\n {\n multiline: 1,\n singleline: 1,\n },\n ],\n 'vue/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n template: 120,\n },\n ],\n 'vue/no-dupe-keys': 'error',\n 'vue/no-lone-template': 'error',\n 'vue/no-multi-spaces': 'error',\n 'vue/no-multiple-objects-in-class': 'error',\n 'vue/no-root-v-if': 'error',\n 'vue/no-template-target-blank': 'error',\n 'vue/no-v-html': 'error',\n 'vue/prefer-define-options': 'error',\n 'vue/prefer-separate-static-class': 'error',\n 'vue/require-explicit-emits': 'error',\n 'vue/require-typed-ref': 'error',\n },\n };\n}\n"],"mappings":";;;;;AAQA,SAAgB,kBAAuC;AACnD,QAAO;EACH,OAAO,CAAC,WAAW;EACnB,SAAS;GACL,0BAA0B;GAC1B,kBAAkB;GAClB;GACH;EACD,OAAO;GACH,2CAA2C;GAC3C,mCAAmC,CAC/B,SACA,EAAE,cAAc,MAAM,CACzB;GACD,0CAA0C;GAC1C,iBAAiB;GACjB,gCAAgC;GAChC,kDAAkD;GAClD,kCAAkC;GAClC,8CAA8C;GAC9C,6BAA6B;GAC7B,wBAAwB;GACxB,mBAAmB,CACf,SACA,EACI,OAAO;IACH;IACA;IACA;IACH,EACJ,CACJ;GACD,2BAA2B;GAC3B,gCAAgC;GAChC,gCAAgC;GAChC,+BAA+B;GAC/B,oCAAoC;GACpC,oCAAoC;GACpC,mBAAmB,CACf,SACA,EACH;GACD,+BAA+B,CAC3B,SACA;IACI,WAAW;IACX,YAAY;IACf,CACJ;GACD,eAAe,CACX,QACA;IACI,MAAM;IACN,UAAU;IACV,UAAU;IACb,CACJ;GACD,oBAAoB;GACpB,wBAAwB;GACxB,uBAAuB;GACvB,oCAAoC;GACpC,oBAAoB;GACpB,gCAAgC;GAChC,iBAAiB;GACjB,6BAA6B;GAC7B,oCAAoC;GACpC,8BAA8B;GAC9B,yBAAyB;GAC5B;EACJ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kikiutils/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"description": "Using antfu/eslint-config as a base for eslint-config, slightly modified the settings and added additional plugins, mainly for my own use.",
|
|
6
6
|
"author": "kiki-kanri",
|
|
7
7
|
"license": "MIT",
|
|
@@ -12,22 +12,9 @@
|
|
|
12
12
|
"keywords": [],
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/index.js",
|
|
18
|
-
"require": null
|
|
19
|
-
},
|
|
20
15
|
"./*": "./dist/*.js",
|
|
21
|
-
"./index": {
|
|
22
|
-
"types": null,
|
|
23
|
-
"import": null,
|
|
24
|
-
"require": null
|
|
25
|
-
},
|
|
26
16
|
"./package.json": "./package.json"
|
|
27
17
|
},
|
|
28
|
-
"main": "./dist/index.js",
|
|
29
|
-
"module": "./dist/index.js",
|
|
30
|
-
"types": "./dist/index.d.ts",
|
|
31
18
|
"files": [
|
|
32
19
|
"./dist",
|
|
33
20
|
"./src"
|
|
@@ -49,40 +36,55 @@
|
|
|
49
36
|
"unused-exports": "ts-unused-exports ./tsconfig.json"
|
|
50
37
|
},
|
|
51
38
|
"peerDependencies": {
|
|
39
|
+
"@kikiutils/eslint-plugin-tailwindcss": "^3.19.0",
|
|
40
|
+
"@kikiutils/eslint-plugin-vue": "^10.2.2",
|
|
52
41
|
"eslint": "^9.35.0",
|
|
53
|
-
"eslint-flat-config-utils": "^2.1.1"
|
|
42
|
+
"eslint-flat-config-utils": "^2.1.1",
|
|
43
|
+
"eslint-plugin-format": "^1.0.2",
|
|
44
|
+
"eslint-plugin-tailwindcss": "^3.18.2"
|
|
54
45
|
},
|
|
55
46
|
"peerDependenciesMeta": {
|
|
47
|
+
"@kikiutils/eslint-plugin-tailwindcss": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"@kikiutils/eslint-plugin-vue": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
56
53
|
"eslint-flat-config-utils": {
|
|
57
54
|
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"eslint-plugin-format": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"eslint-plugin-tailwindcss": {
|
|
60
|
+
"optional": true
|
|
58
61
|
}
|
|
59
62
|
},
|
|
60
63
|
"dependencies": {
|
|
61
|
-
"@antfu/eslint-config": "^
|
|
62
|
-
"
|
|
63
|
-
"@kikiutils/eslint-plugin-vue": "^10.2.2",
|
|
64
|
-
"eslint-plugin-format": "^1.0.2",
|
|
65
|
-
"eslint-plugin-promise": "^7.2.1",
|
|
66
|
-
"eslint-plugin-tailwindcss": "^3.18.2"
|
|
64
|
+
"@antfu/eslint-config": "^6.2.0",
|
|
65
|
+
"eslint-plugin-promise": "^7.2.1"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
|
-
"@kikiutils/
|
|
68
|
+
"@kikiutils/eslint-plugin-tailwindcss": "^3.19.0",
|
|
69
|
+
"@kikiutils/eslint-plugin-vue": "^10.2.2",
|
|
70
70
|
"@kikiutils/tsconfigs": "^5.0.5",
|
|
71
|
-
"@types/node": "^24.
|
|
72
|
-
"@vitest/coverage-v8": "^
|
|
71
|
+
"@types/node": "^24.10.0",
|
|
72
|
+
"@vitest/coverage-v8": "^4.0.8",
|
|
73
|
+
"changelogen": "^0.6.2",
|
|
73
74
|
"depcheck": "^1.4.7",
|
|
74
75
|
"eslint-flat-config-utils": "^2.1.4",
|
|
75
|
-
"
|
|
76
|
+
"eslint-plugin-format": "^1.0.2",
|
|
77
|
+
"eslint-plugin-tailwindcss": "^3.18.2",
|
|
78
|
+
"publint": "^0.3.15",
|
|
76
79
|
"ts-unused-exports": "^11.0.1",
|
|
77
|
-
"tsdown": "^0.
|
|
80
|
+
"tsdown": "^0.16.1",
|
|
78
81
|
"typescript": "^5.9.3",
|
|
79
|
-
"unplugin-unused": "^0.5.
|
|
80
|
-
"vitest": "^
|
|
82
|
+
"unplugin-unused": "^0.5.6",
|
|
83
|
+
"vitest": "^4.0.8"
|
|
81
84
|
},
|
|
82
85
|
"pnpm": {
|
|
83
86
|
"onlyBuiltDependencies": [
|
|
84
|
-
"esbuild"
|
|
85
|
-
"unrs-resolver"
|
|
87
|
+
"esbuild"
|
|
86
88
|
]
|
|
87
89
|
}
|
|
88
90
|
}
|
package/src/{index.ts → base.ts}
RENAMED
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
import { antfu } from '@antfu/eslint-config';
|
|
2
1
|
import type { TypedFlatConfigItem } from '@antfu/eslint-config';
|
|
3
2
|
// @ts-expect-error No declare file.
|
|
4
|
-
import kikiutilsTailwindcss from '@kikiutils/eslint-plugin-tailwindcss';
|
|
5
|
-
// @ts-expect-error Ignore this error.
|
|
6
|
-
import kikiutilsEslintPluginVue from '@kikiutils/eslint-plugin-vue';
|
|
7
|
-
// @ts-expect-error Ignore this error.
|
|
8
|
-
import format from 'eslint-plugin-format';
|
|
9
|
-
// @ts-expect-error No declare file.
|
|
10
3
|
import promise from 'eslint-plugin-promise';
|
|
11
|
-
// @ts-expect-error No declare file.
|
|
12
|
-
import tailwindcss from 'eslint-plugin-tailwindcss';
|
|
13
4
|
|
|
14
5
|
const basePerfectionistSortOptions = {
|
|
15
6
|
ignoreCase: false,
|
|
16
7
|
type: 'natural',
|
|
17
8
|
} as const;
|
|
18
9
|
|
|
19
|
-
export function
|
|
20
|
-
|
|
10
|
+
export function createBaseConfigs(environment: 'bun' | 'node' = 'node'): TypedFlatConfigItem[] {
|
|
11
|
+
return [
|
|
21
12
|
{
|
|
22
13
|
files: ['**/*.{cjs,js,mjs,ts,tsx,vue}'],
|
|
23
14
|
plugins: { promise },
|
|
@@ -293,75 +284,6 @@ export function createConfig(environment: 'bun' | 'node' = 'node', options?: Par
|
|
|
293
284
|
'ts/no-redeclare': 'off',
|
|
294
285
|
},
|
|
295
286
|
},
|
|
296
|
-
{
|
|
297
|
-
files: ['**/*.vue'],
|
|
298
|
-
plugins: {
|
|
299
|
-
'@kikiutils/tailwindcss': kikiutilsTailwindcss,
|
|
300
|
-
'@kikiutils/vue': kikiutilsEslintPluginVue,
|
|
301
|
-
tailwindcss,
|
|
302
|
-
},
|
|
303
|
-
rules: {
|
|
304
|
-
'@kikiutils/tailwindcss/classnames-order': 'error',
|
|
305
|
-
'@kikiutils/vue/attributes-order': [
|
|
306
|
-
'error',
|
|
307
|
-
{ alphabetical: true },
|
|
308
|
-
],
|
|
309
|
-
'@kikiutils/vue/no-extra-space-in-class': 'error',
|
|
310
|
-
'style/max-len': 'off',
|
|
311
|
-
'tailwindcss/classnames-order': 'off',
|
|
312
|
-
'tailwindcss/enforces-negative-arbitrary-values': 'error',
|
|
313
|
-
'tailwindcss/enforces-shorthand': 'error',
|
|
314
|
-
'tailwindcss/no-unnecessary-arbitrary-value': 'error',
|
|
315
|
-
'vue/attribute-hyphenation': 'error',
|
|
316
|
-
'vue/attributes-order': 'off',
|
|
317
|
-
'vue/block-order': [
|
|
318
|
-
'error',
|
|
319
|
-
{
|
|
320
|
-
order: [
|
|
321
|
-
'template',
|
|
322
|
-
'script',
|
|
323
|
-
'style',
|
|
324
|
-
],
|
|
325
|
-
},
|
|
326
|
-
],
|
|
327
|
-
'vue/component-api-style': 'error',
|
|
328
|
-
'vue/define-emits-declaration': 'error',
|
|
329
|
-
'vue/define-props-declaration': 'error',
|
|
330
|
-
'vue/enforce-style-attribute': 'error',
|
|
331
|
-
'vue/html-closing-bracket-newline': 'error',
|
|
332
|
-
'vue/html-closing-bracket-spacing': 'error',
|
|
333
|
-
'vue/html-indent': [
|
|
334
|
-
'error',
|
|
335
|
-
4,
|
|
336
|
-
],
|
|
337
|
-
'vue/max-attributes-per-line': [
|
|
338
|
-
'error',
|
|
339
|
-
{
|
|
340
|
-
multiline: 1,
|
|
341
|
-
singleline: 1,
|
|
342
|
-
},
|
|
343
|
-
],
|
|
344
|
-
'vue/max-len': [
|
|
345
|
-
'warn',
|
|
346
|
-
{
|
|
347
|
-
code: 120,
|
|
348
|
-
comments: 120,
|
|
349
|
-
template: 120,
|
|
350
|
-
},
|
|
351
|
-
],
|
|
352
|
-
'vue/no-dupe-keys': 'error',
|
|
353
|
-
'vue/no-lone-template': 'error',
|
|
354
|
-
'vue/no-multi-spaces': 'error',
|
|
355
|
-
'vue/no-multiple-objects-in-class': 'error',
|
|
356
|
-
'vue/no-root-v-if': 'error',
|
|
357
|
-
'vue/no-template-target-blank': 'error',
|
|
358
|
-
'vue/no-v-html': 'error',
|
|
359
|
-
'vue/prefer-define-options': 'error',
|
|
360
|
-
'vue/prefer-separate-static-class': 'error',
|
|
361
|
-
'vue/require-explicit-emits': 'error',
|
|
362
|
-
'vue/require-typed-ref': 'error',
|
|
363
|
-
},
|
|
364
|
-
},
|
|
365
287
|
{
|
|
366
288
|
files: ['**/.vscode/*.json'],
|
|
367
289
|
rules: {
|
|
@@ -386,51 +308,4 @@ export function createConfig(environment: 'bun' | 'node' = 'node', options?: Par
|
|
|
386
308
|
},
|
|
387
309
|
},
|
|
388
310
|
];
|
|
389
|
-
|
|
390
|
-
if (options?.formatters && (typeof options.formatters === 'boolean' || options.formatters.css)) {
|
|
391
|
-
userConfigs.splice(
|
|
392
|
-
1,
|
|
393
|
-
0,
|
|
394
|
-
createPrettierCssConfig('css'),
|
|
395
|
-
createPrettierCssConfig('sass'),
|
|
396
|
-
createPrettierCssConfig('scss'),
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
return antfu(
|
|
401
|
-
{
|
|
402
|
-
typescript: true,
|
|
403
|
-
...options,
|
|
404
|
-
},
|
|
405
|
-
...userConfigs,
|
|
406
|
-
);
|
|
407
311
|
}
|
|
408
|
-
|
|
409
|
-
function createPrettierCssConfig(parser: 'css' | 'sass' | 'scss'): TypedFlatConfigItem {
|
|
410
|
-
return {
|
|
411
|
-
files: [`**/*.${parser}`],
|
|
412
|
-
languageOptions: { parser: format.parserPlain },
|
|
413
|
-
plugins: { format },
|
|
414
|
-
rules: {
|
|
415
|
-
'format/prettier': [
|
|
416
|
-
'error',
|
|
417
|
-
{
|
|
418
|
-
parser,
|
|
419
|
-
printWidth: 120,
|
|
420
|
-
singleQuote: true,
|
|
421
|
-
tabWidth: 4,
|
|
422
|
-
},
|
|
423
|
-
],
|
|
424
|
-
},
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
export const bun = createConfig('bun');
|
|
429
|
-
export const node = createConfig('node');
|
|
430
|
-
export const vue = createConfig(
|
|
431
|
-
'node',
|
|
432
|
-
{
|
|
433
|
-
formatters: { css: true },
|
|
434
|
-
vue: true,
|
|
435
|
-
},
|
|
436
|
-
);
|
package/src/style.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TypedFlatConfigItem } from '@antfu/eslint-config';
|
|
2
|
+
// @ts-expect-error Ignore this error.
|
|
3
|
+
import format from 'eslint-plugin-format';
|
|
4
|
+
|
|
5
|
+
function createPrettierCssConfig(parser: 'css' | 'sass' | 'scss'): TypedFlatConfigItem {
|
|
6
|
+
return {
|
|
7
|
+
files: [`**/*.${parser}`],
|
|
8
|
+
languageOptions: { parser: format.parserPlain },
|
|
9
|
+
plugins: { format },
|
|
10
|
+
rules: {
|
|
11
|
+
'format/prettier': [
|
|
12
|
+
'error',
|
|
13
|
+
{
|
|
14
|
+
parser,
|
|
15
|
+
printWidth: 120,
|
|
16
|
+
singleQuote: true,
|
|
17
|
+
tabWidth: 4,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function createStyleFilesConfigs(): TypedFlatConfigItem[] {
|
|
25
|
+
return [
|
|
26
|
+
createPrettierCssConfig('css'),
|
|
27
|
+
createPrettierCssConfig('sass'),
|
|
28
|
+
createPrettierCssConfig('scss'),
|
|
29
|
+
];
|
|
30
|
+
}
|
package/src/vue.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { TypedFlatConfigItem } from '@antfu/eslint-config';
|
|
2
|
+
// @ts-expect-error No declare file.
|
|
3
|
+
import kikiutilsTailwindcss from '@kikiutils/eslint-plugin-tailwindcss';
|
|
4
|
+
// @ts-expect-error Ignore this error.
|
|
5
|
+
import kikiutilsEslintPluginVue from '@kikiutils/eslint-plugin-vue';
|
|
6
|
+
// @ts-expect-error No declare file.
|
|
7
|
+
import tailwindcss from 'eslint-plugin-tailwindcss';
|
|
8
|
+
|
|
9
|
+
export function createVueConfig(): TypedFlatConfigItem {
|
|
10
|
+
return {
|
|
11
|
+
files: ['**/*.vue'],
|
|
12
|
+
plugins: {
|
|
13
|
+
'@kikiutils/tailwindcss': kikiutilsTailwindcss,
|
|
14
|
+
'@kikiutils/vue': kikiutilsEslintPluginVue,
|
|
15
|
+
tailwindcss,
|
|
16
|
+
},
|
|
17
|
+
rules: {
|
|
18
|
+
'@kikiutils/tailwindcss/classnames-order': 'error',
|
|
19
|
+
'@kikiutils/vue/attributes-order': [
|
|
20
|
+
'error',
|
|
21
|
+
{ alphabetical: true },
|
|
22
|
+
],
|
|
23
|
+
'@kikiutils/vue/no-extra-space-in-class': 'error',
|
|
24
|
+
'style/max-len': 'off',
|
|
25
|
+
'tailwindcss/classnames-order': 'off',
|
|
26
|
+
'tailwindcss/enforces-negative-arbitrary-values': 'error',
|
|
27
|
+
'tailwindcss/enforces-shorthand': 'error',
|
|
28
|
+
'tailwindcss/no-unnecessary-arbitrary-value': 'error',
|
|
29
|
+
'vue/attribute-hyphenation': 'error',
|
|
30
|
+
'vue/attributes-order': 'off',
|
|
31
|
+
'vue/block-order': [
|
|
32
|
+
'error',
|
|
33
|
+
{
|
|
34
|
+
order: [
|
|
35
|
+
'template',
|
|
36
|
+
'script',
|
|
37
|
+
'style',
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
'vue/component-api-style': 'error',
|
|
42
|
+
'vue/define-emits-declaration': 'error',
|
|
43
|
+
'vue/define-props-declaration': 'error',
|
|
44
|
+
'vue/enforce-style-attribute': 'error',
|
|
45
|
+
'vue/html-closing-bracket-newline': 'error',
|
|
46
|
+
'vue/html-closing-bracket-spacing': 'error',
|
|
47
|
+
'vue/html-indent': [
|
|
48
|
+
'error',
|
|
49
|
+
4,
|
|
50
|
+
],
|
|
51
|
+
'vue/max-attributes-per-line': [
|
|
52
|
+
'error',
|
|
53
|
+
{
|
|
54
|
+
multiline: 1,
|
|
55
|
+
singleline: 1,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
'vue/max-len': [
|
|
59
|
+
'warn',
|
|
60
|
+
{
|
|
61
|
+
code: 120,
|
|
62
|
+
comments: 120,
|
|
63
|
+
template: 120,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
'vue/no-dupe-keys': 'error',
|
|
67
|
+
'vue/no-lone-template': 'error',
|
|
68
|
+
'vue/no-multi-spaces': 'error',
|
|
69
|
+
'vue/no-multiple-objects-in-class': 'error',
|
|
70
|
+
'vue/no-root-v-if': 'error',
|
|
71
|
+
'vue/no-template-target-blank': 'error',
|
|
72
|
+
'vue/no-v-html': 'error',
|
|
73
|
+
'vue/prefer-define-options': 'error',
|
|
74
|
+
'vue/prefer-separate-static-class': 'error',
|
|
75
|
+
'vue/require-explicit-emits': 'error',
|
|
76
|
+
'vue/require-typed-ref': 'error',
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as _antfu_eslint_config0 from "@antfu/eslint-config";
|
|
2
|
-
import { TypedFlatConfigItem, antfu } from "@antfu/eslint-config";
|
|
3
|
-
import * as eslint_flat_config_utils0 from "eslint-flat-config-utils";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
declare function createConfig(environment?: 'bun' | 'node', options?: Parameters<typeof antfu>[0]): eslint_flat_config_utils0.FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config0.ConfigNames>;
|
|
7
|
-
declare const bun: eslint_flat_config_utils0.FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config0.ConfigNames>;
|
|
8
|
-
declare const node: eslint_flat_config_utils0.FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config0.ConfigNames>;
|
|
9
|
-
declare const vue: eslint_flat_config_utils0.FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config0.ConfigNames>;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { bun, createConfig, node, vue };
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;iBAkBgB,YAAA,yCAA6D,kBAAkB,YAAS,yBAAA,CAAA,mBAAA,qBAAA,qBAAA,CAAA,WAAA;cAyZ3F,KAAG,yBAAA,CAAA,mBAAA,qBAAA,qBAAA,CAAA,WAAA;cACH,MAAI,yBAAA,CAAA,mBAAA,qBAAA,qBAAA,CAAA,WAAA;AA1ZD,cA2ZH,GA3Ze,EA2ZZ,yBAAA,CAAA,kBA3ZY,CA2ZZ,mBA3ZY,EA2ZZ,qBAAA,CAAA,WAAA,CA3ZY"}
|
package/dist/index.js
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { antfu } from "@antfu/eslint-config";
|
|
2
|
-
import kikiutilsTailwindcss from "@kikiutils/eslint-plugin-tailwindcss";
|
|
3
|
-
import kikiutilsEslintPluginVue from "@kikiutils/eslint-plugin-vue";
|
|
4
|
-
import format from "eslint-plugin-format";
|
|
5
|
-
import promise from "eslint-plugin-promise";
|
|
6
|
-
import tailwindcss from "eslint-plugin-tailwindcss";
|
|
7
|
-
|
|
8
|
-
//#region src/index.ts
|
|
9
|
-
const basePerfectionistSortOptions = {
|
|
10
|
-
ignoreCase: false,
|
|
11
|
-
type: "natural"
|
|
12
|
-
};
|
|
13
|
-
function createConfig(environment = "node", options) {
|
|
14
|
-
const userConfigs = [
|
|
15
|
-
{
|
|
16
|
-
files: ["**/*.{cjs,js,mjs,ts,tsx,vue}"],
|
|
17
|
-
plugins: { promise },
|
|
18
|
-
rules: {
|
|
19
|
-
"antfu/consistent-list-newline": ["error", {
|
|
20
|
-
ArrayExpression: false,
|
|
21
|
-
ArrayPattern: false
|
|
22
|
-
}],
|
|
23
|
-
"antfu/curly": "off",
|
|
24
|
-
"antfu/if-newline": "off",
|
|
25
|
-
"antfu/no-top-level-await": "off",
|
|
26
|
-
"curly": ["error", "multi-line"],
|
|
27
|
-
"max-classes-per-file": ["error", 1],
|
|
28
|
-
"no-promise-executor-return": ["error", { allowVoid: true }],
|
|
29
|
-
"node/prefer-global/process": ["error", "always"],
|
|
30
|
-
"perfectionist/sort-array-includes": ["error", basePerfectionistSortOptions],
|
|
31
|
-
"perfectionist/sort-enums": ["error", basePerfectionistSortOptions],
|
|
32
|
-
"perfectionist/sort-heritage-clauses": ["error", {
|
|
33
|
-
ignoreCase: false,
|
|
34
|
-
type: "natural"
|
|
35
|
-
}],
|
|
36
|
-
"perfectionist/sort-imports": ["error", {
|
|
37
|
-
environment,
|
|
38
|
-
groups: [
|
|
39
|
-
"side-effect",
|
|
40
|
-
"side-effect-style",
|
|
41
|
-
"style",
|
|
42
|
-
["builtin", "builtin-type"],
|
|
43
|
-
["external", "external-type"],
|
|
44
|
-
["internal", "internal-type"],
|
|
45
|
-
["parent", "parent-type"],
|
|
46
|
-
["sibling", "sibling-type"],
|
|
47
|
-
["index", "index-type"],
|
|
48
|
-
"object",
|
|
49
|
-
"unknown"
|
|
50
|
-
],
|
|
51
|
-
ignoreCase: false,
|
|
52
|
-
internalPattern: [
|
|
53
|
-
"^#.*",
|
|
54
|
-
"^@/.*",
|
|
55
|
-
"^~/.*"
|
|
56
|
-
],
|
|
57
|
-
type: "natural"
|
|
58
|
-
}],
|
|
59
|
-
"perfectionist/sort-interfaces": ["error", basePerfectionistSortOptions],
|
|
60
|
-
"perfectionist/sort-intersection-types": ["error", basePerfectionistSortOptions],
|
|
61
|
-
"perfectionist/sort-maps": ["error", basePerfectionistSortOptions],
|
|
62
|
-
"perfectionist/sort-modules": ["error", {
|
|
63
|
-
...basePerfectionistSortOptions,
|
|
64
|
-
groups: [
|
|
65
|
-
"declare-type",
|
|
66
|
-
["export-type", "type"],
|
|
67
|
-
"declare-interface",
|
|
68
|
-
["export-interface", "interface"],
|
|
69
|
-
"declare-enum",
|
|
70
|
-
["enum", "export-enum"],
|
|
71
|
-
"declare-class",
|
|
72
|
-
["class", "export-class"],
|
|
73
|
-
"declare-function",
|
|
74
|
-
["export-function", "function"]
|
|
75
|
-
]
|
|
76
|
-
}],
|
|
77
|
-
"perfectionist/sort-object-types": ["error", basePerfectionistSortOptions],
|
|
78
|
-
"perfectionist/sort-objects": ["error", basePerfectionistSortOptions],
|
|
79
|
-
"perfectionist/sort-sets": ["error", basePerfectionistSortOptions],
|
|
80
|
-
"perfectionist/sort-switch-case": ["error", {
|
|
81
|
-
ignoreCase: false,
|
|
82
|
-
type: "natural"
|
|
83
|
-
}],
|
|
84
|
-
"perfectionist/sort-union-types": ["error", basePerfectionistSortOptions],
|
|
85
|
-
"perfectionist/sort-variable-declarations": ["error", basePerfectionistSortOptions],
|
|
86
|
-
"promise/no-multiple-resolved": "error",
|
|
87
|
-
"promise/no-return-in-finally": "error",
|
|
88
|
-
"promise/no-return-wrap": "error",
|
|
89
|
-
"require-await": "error",
|
|
90
|
-
"style/array-bracket-newline": ["error", { multiline: true }],
|
|
91
|
-
"style/array-element-newline": ["error", {
|
|
92
|
-
ArrayExpression: {
|
|
93
|
-
consistent: true,
|
|
94
|
-
minItems: 2
|
|
95
|
-
},
|
|
96
|
-
ArrayPattern: { minItems: 3 }
|
|
97
|
-
}],
|
|
98
|
-
"style/arrow-parens": ["error", "always"],
|
|
99
|
-
"style/brace-style": [
|
|
100
|
-
"error",
|
|
101
|
-
"1tbs",
|
|
102
|
-
{ allowSingleLine: false }
|
|
103
|
-
],
|
|
104
|
-
"style/function-call-spacing": ["error", "never"],
|
|
105
|
-
"style/indent": ["error", 4],
|
|
106
|
-
"style/max-len": ["warn", {
|
|
107
|
-
code: 120,
|
|
108
|
-
comments: 120
|
|
109
|
-
}],
|
|
110
|
-
"style/member-delimiter-style": ["error", { multiline: {
|
|
111
|
-
delimiter: "semi",
|
|
112
|
-
requireLast: true
|
|
113
|
-
} }],
|
|
114
|
-
"style/no-extra-parens": [
|
|
115
|
-
"error",
|
|
116
|
-
"all",
|
|
117
|
-
{ nestedBinaryExpressions: false }
|
|
118
|
-
],
|
|
119
|
-
"style/no-extra-semi": "error",
|
|
120
|
-
"style/object-curly-newline": ["error", {
|
|
121
|
-
ExportDeclaration: {
|
|
122
|
-
minProperties: 2,
|
|
123
|
-
multiline: true
|
|
124
|
-
},
|
|
125
|
-
ImportDeclaration: {
|
|
126
|
-
minProperties: 2,
|
|
127
|
-
multiline: true
|
|
128
|
-
},
|
|
129
|
-
ObjectExpression: {
|
|
130
|
-
minProperties: 2,
|
|
131
|
-
multiline: true
|
|
132
|
-
},
|
|
133
|
-
ObjectPattern: {
|
|
134
|
-
minProperties: 3,
|
|
135
|
-
multiline: true
|
|
136
|
-
}
|
|
137
|
-
}],
|
|
138
|
-
"style/operator-linebreak": [
|
|
139
|
-
"error",
|
|
140
|
-
"before",
|
|
141
|
-
{ overrides: { "=": "after" } }
|
|
142
|
-
],
|
|
143
|
-
"style/padding-line-between-statements": [
|
|
144
|
-
"error",
|
|
145
|
-
{
|
|
146
|
-
blankLine: "always",
|
|
147
|
-
next: [
|
|
148
|
-
"class",
|
|
149
|
-
"enum",
|
|
150
|
-
"function"
|
|
151
|
-
],
|
|
152
|
-
prev: "*"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
blankLine: "always",
|
|
156
|
-
next: "*",
|
|
157
|
-
prev: ["class", "function"]
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"style/semi": ["error", "always"],
|
|
161
|
-
"ts/consistent-generic-constructors": ["error", "constructor"],
|
|
162
|
-
"ts/no-redeclare": "off"
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
files: ["**/*.vue"],
|
|
167
|
-
plugins: {
|
|
168
|
-
"@kikiutils/tailwindcss": kikiutilsTailwindcss,
|
|
169
|
-
"@kikiutils/vue": kikiutilsEslintPluginVue,
|
|
170
|
-
tailwindcss
|
|
171
|
-
},
|
|
172
|
-
rules: {
|
|
173
|
-
"@kikiutils/tailwindcss/classnames-order": "error",
|
|
174
|
-
"@kikiutils/vue/attributes-order": ["error", { alphabetical: true }],
|
|
175
|
-
"@kikiutils/vue/no-extra-space-in-class": "error",
|
|
176
|
-
"style/max-len": "off",
|
|
177
|
-
"tailwindcss/classnames-order": "off",
|
|
178
|
-
"tailwindcss/enforces-negative-arbitrary-values": "error",
|
|
179
|
-
"tailwindcss/enforces-shorthand": "error",
|
|
180
|
-
"tailwindcss/no-unnecessary-arbitrary-value": "error",
|
|
181
|
-
"vue/attribute-hyphenation": "error",
|
|
182
|
-
"vue/attributes-order": "off",
|
|
183
|
-
"vue/block-order": ["error", { order: [
|
|
184
|
-
"template",
|
|
185
|
-
"script",
|
|
186
|
-
"style"
|
|
187
|
-
] }],
|
|
188
|
-
"vue/component-api-style": "error",
|
|
189
|
-
"vue/define-emits-declaration": "error",
|
|
190
|
-
"vue/define-props-declaration": "error",
|
|
191
|
-
"vue/enforce-style-attribute": "error",
|
|
192
|
-
"vue/html-closing-bracket-newline": "error",
|
|
193
|
-
"vue/html-closing-bracket-spacing": "error",
|
|
194
|
-
"vue/html-indent": ["error", 4],
|
|
195
|
-
"vue/max-attributes-per-line": ["error", {
|
|
196
|
-
multiline: 1,
|
|
197
|
-
singleline: 1
|
|
198
|
-
}],
|
|
199
|
-
"vue/max-len": ["warn", {
|
|
200
|
-
code: 120,
|
|
201
|
-
comments: 120,
|
|
202
|
-
template: 120
|
|
203
|
-
}],
|
|
204
|
-
"vue/no-dupe-keys": "error",
|
|
205
|
-
"vue/no-lone-template": "error",
|
|
206
|
-
"vue/no-multi-spaces": "error",
|
|
207
|
-
"vue/no-multiple-objects-in-class": "error",
|
|
208
|
-
"vue/no-root-v-if": "error",
|
|
209
|
-
"vue/no-template-target-blank": "error",
|
|
210
|
-
"vue/no-v-html": "error",
|
|
211
|
-
"vue/prefer-define-options": "error",
|
|
212
|
-
"vue/prefer-separate-static-class": "error",
|
|
213
|
-
"vue/require-explicit-emits": "error",
|
|
214
|
-
"vue/require-typed-ref": "error"
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
files: ["**/.vscode/*.json"],
|
|
219
|
-
rules: {
|
|
220
|
-
"jsonc/sort-array-values": ["error", {
|
|
221
|
-
order: {
|
|
222
|
-
natural: true,
|
|
223
|
-
type: "asc"
|
|
224
|
-
},
|
|
225
|
-
pathPattern: "^.*$"
|
|
226
|
-
}],
|
|
227
|
-
"jsonc/sort-keys": [
|
|
228
|
-
"error",
|
|
229
|
-
"asc",
|
|
230
|
-
{
|
|
231
|
-
caseSensitive: true,
|
|
232
|
-
natural: true
|
|
233
|
-
}
|
|
234
|
-
]
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
];
|
|
238
|
-
if (options?.formatters && (typeof options.formatters === "boolean" || options.formatters.css)) userConfigs.splice(1, 0, createPrettierCssConfig("css"), createPrettierCssConfig("sass"), createPrettierCssConfig("scss"));
|
|
239
|
-
return antfu({
|
|
240
|
-
typescript: true,
|
|
241
|
-
...options
|
|
242
|
-
}, ...userConfigs);
|
|
243
|
-
}
|
|
244
|
-
function createPrettierCssConfig(parser) {
|
|
245
|
-
return {
|
|
246
|
-
files: [`**/*.${parser}`],
|
|
247
|
-
languageOptions: { parser: format.parserPlain },
|
|
248
|
-
plugins: { format },
|
|
249
|
-
rules: { "format/prettier": ["error", {
|
|
250
|
-
parser,
|
|
251
|
-
printWidth: 120,
|
|
252
|
-
singleQuote: true,
|
|
253
|
-
tabWidth: 4
|
|
254
|
-
}] }
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
const bun = createConfig("bun");
|
|
258
|
-
const node = createConfig("node");
|
|
259
|
-
const vue = createConfig("node", {
|
|
260
|
-
formatters: { css: true },
|
|
261
|
-
vue: true
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
//#endregion
|
|
265
|
-
export { bun, createConfig, node, vue };
|
|
266
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["userConfigs: Parameters<typeof antfu>[1]"],"sources":["../src/index.ts"],"sourcesContent":["import { antfu } from '@antfu/eslint-config';\nimport type { TypedFlatConfigItem } from '@antfu/eslint-config';\n// @ts-expect-error No declare file.\nimport kikiutilsTailwindcss from '@kikiutils/eslint-plugin-tailwindcss';\n// @ts-expect-error Ignore this error.\nimport kikiutilsEslintPluginVue from '@kikiutils/eslint-plugin-vue';\n// @ts-expect-error Ignore this error.\nimport format from 'eslint-plugin-format';\n// @ts-expect-error No declare file.\nimport promise from 'eslint-plugin-promise';\n// @ts-expect-error No declare file.\nimport tailwindcss from 'eslint-plugin-tailwindcss';\n\nconst basePerfectionistSortOptions = {\n ignoreCase: false,\n type: 'natural',\n} as const;\n\nexport function createConfig(environment: 'bun' | 'node' = 'node', options?: Parameters<typeof antfu>[0]) {\n const userConfigs: Parameters<typeof antfu>[1] = [\n {\n files: ['**/*.{cjs,js,mjs,ts,tsx,vue}'],\n plugins: { promise },\n rules: {\n 'antfu/consistent-list-newline': [\n 'error',\n {\n ArrayExpression: false,\n ArrayPattern: false,\n },\n ],\n 'antfu/curly': 'off',\n 'antfu/if-newline': 'off',\n 'antfu/no-top-level-await': 'off',\n 'curly': [\n 'error',\n 'multi-line',\n ],\n 'max-classes-per-file': [\n 'error',\n 1,\n ],\n 'no-promise-executor-return': [\n 'error',\n { allowVoid: true },\n ],\n 'node/prefer-global/process': [\n 'error',\n 'always',\n ],\n 'perfectionist/sort-array-includes': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-enums': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-heritage-clauses': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-imports': [\n 'error',\n {\n environment,\n groups: [\n 'side-effect',\n 'side-effect-style',\n 'style',\n [\n 'builtin',\n 'builtin-type',\n ],\n [\n 'external',\n 'external-type',\n ],\n [\n 'internal',\n 'internal-type',\n ],\n [\n 'parent',\n 'parent-type',\n ],\n [\n 'sibling',\n 'sibling-type',\n ],\n [\n 'index',\n 'index-type',\n ],\n 'object',\n 'unknown',\n ],\n ignoreCase: false,\n internalPattern: [\n '^#.*',\n '^@/.*',\n '^~/.*',\n ],\n type: 'natural',\n },\n ],\n 'perfectionist/sort-interfaces': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-intersection-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-maps': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-modules': [\n 'error',\n {\n ...basePerfectionistSortOptions,\n groups: [\n 'declare-type',\n [\n 'export-type',\n 'type',\n ],\n 'declare-interface',\n [\n 'export-interface',\n 'interface',\n ],\n 'declare-enum',\n [\n 'enum',\n 'export-enum',\n ],\n 'declare-class',\n [\n 'class',\n 'export-class',\n ],\n 'declare-function',\n [\n 'export-function',\n 'function',\n ],\n ],\n },\n ],\n 'perfectionist/sort-object-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-objects': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-sets': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-switch-case': [\n 'error',\n {\n ignoreCase: false,\n type: 'natural',\n },\n ],\n 'perfectionist/sort-union-types': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'perfectionist/sort-variable-declarations': [\n 'error',\n basePerfectionistSortOptions,\n ],\n 'promise/no-multiple-resolved': 'error',\n 'promise/no-return-in-finally': 'error',\n 'promise/no-return-wrap': 'error',\n 'require-await': 'error',\n 'style/array-bracket-newline': [\n 'error',\n { multiline: true },\n ],\n 'style/array-element-newline': [\n 'error',\n {\n ArrayExpression: {\n consistent: true,\n minItems: 2,\n },\n ArrayPattern: { minItems: 3 },\n },\n ],\n 'style/arrow-parens': [\n 'error',\n 'always',\n ],\n 'style/brace-style': [\n 'error',\n '1tbs',\n { allowSingleLine: false },\n ],\n 'style/function-call-spacing': [\n 'error',\n 'never',\n ],\n 'style/indent': [\n 'error',\n 4,\n ],\n 'style/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n },\n ],\n 'style/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true,\n },\n },\n ],\n 'style/no-extra-parens': [\n 'error',\n 'all',\n { nestedBinaryExpressions: false },\n ],\n 'style/no-extra-semi': 'error',\n 'style/object-curly-newline': [\n 'error',\n {\n ExportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ImportDeclaration: {\n minProperties: 2,\n multiline: true,\n },\n ObjectExpression: {\n minProperties: 2,\n multiline: true,\n },\n ObjectPattern: {\n minProperties: 3,\n multiline: true,\n },\n },\n ],\n 'style/operator-linebreak': [\n 'error',\n 'before',\n { overrides: { '=': 'after' } },\n ],\n 'style/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: [\n 'class',\n 'enum',\n 'function',\n ],\n prev: '*',\n },\n {\n blankLine: 'always',\n next: '*',\n prev: [\n 'class',\n 'function',\n ],\n },\n ],\n 'style/semi': [\n 'error',\n 'always',\n ],\n 'ts/consistent-generic-constructors': [\n 'error',\n 'constructor',\n ],\n 'ts/no-redeclare': 'off',\n },\n },\n {\n files: ['**/*.vue'],\n plugins: {\n '@kikiutils/tailwindcss': kikiutilsTailwindcss,\n '@kikiutils/vue': kikiutilsEslintPluginVue,\n tailwindcss,\n },\n rules: {\n '@kikiutils/tailwindcss/classnames-order': 'error',\n '@kikiutils/vue/attributes-order': [\n 'error',\n { alphabetical: true },\n ],\n '@kikiutils/vue/no-extra-space-in-class': 'error',\n 'style/max-len': 'off',\n 'tailwindcss/classnames-order': 'off',\n 'tailwindcss/enforces-negative-arbitrary-values': 'error',\n 'tailwindcss/enforces-shorthand': 'error',\n 'tailwindcss/no-unnecessary-arbitrary-value': 'error',\n 'vue/attribute-hyphenation': 'error',\n 'vue/attributes-order': 'off',\n 'vue/block-order': [\n 'error',\n {\n order: [\n 'template',\n 'script',\n 'style',\n ],\n },\n ],\n 'vue/component-api-style': 'error',\n 'vue/define-emits-declaration': 'error',\n 'vue/define-props-declaration': 'error',\n 'vue/enforce-style-attribute': 'error',\n 'vue/html-closing-bracket-newline': 'error',\n 'vue/html-closing-bracket-spacing': 'error',\n 'vue/html-indent': [\n 'error',\n 4,\n ],\n 'vue/max-attributes-per-line': [\n 'error',\n {\n multiline: 1,\n singleline: 1,\n },\n ],\n 'vue/max-len': [\n 'warn',\n {\n code: 120,\n comments: 120,\n template: 120,\n },\n ],\n 'vue/no-dupe-keys': 'error',\n 'vue/no-lone-template': 'error',\n 'vue/no-multi-spaces': 'error',\n 'vue/no-multiple-objects-in-class': 'error',\n 'vue/no-root-v-if': 'error',\n 'vue/no-template-target-blank': 'error',\n 'vue/no-v-html': 'error',\n 'vue/prefer-define-options': 'error',\n 'vue/prefer-separate-static-class': 'error',\n 'vue/require-explicit-emits': 'error',\n 'vue/require-typed-ref': 'error',\n },\n },\n {\n files: ['**/.vscode/*.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: {\n natural: true,\n type: 'asc',\n },\n pathPattern: '^.*$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n 'asc',\n {\n caseSensitive: true,\n natural: true,\n },\n ],\n },\n },\n ];\n\n if (options?.formatters && (typeof options.formatters === 'boolean' || options.formatters.css)) {\n userConfigs.splice(\n 1,\n 0,\n createPrettierCssConfig('css'),\n createPrettierCssConfig('sass'),\n createPrettierCssConfig('scss'),\n );\n }\n\n return antfu(\n {\n typescript: true,\n ...options,\n },\n ...userConfigs,\n );\n}\n\nfunction createPrettierCssConfig(parser: 'css' | 'sass' | 'scss'): TypedFlatConfigItem {\n return {\n files: [`**/*.${parser}`],\n languageOptions: { parser: format.parserPlain },\n plugins: { format },\n rules: {\n 'format/prettier': [\n 'error',\n {\n parser,\n printWidth: 120,\n singleQuote: true,\n tabWidth: 4,\n },\n ],\n },\n };\n}\n\nexport const bun = createConfig('bun');\nexport const node = createConfig('node');\nexport const vue = createConfig(\n 'node',\n {\n formatters: { css: true },\n vue: true,\n },\n);\n"],"mappings":";;;;;;;;AAaA,MAAM,+BAA+B;CACjC,YAAY;CACZ,MAAM;CACT;AAED,SAAgB,aAAa,cAA8B,QAAQ,SAAuC;CACtG,MAAMA,cAA2C;EAC7C;GACI,OAAO,CAAC,+BAA+B;GACvC,SAAS,EAAE,SAAS;GACpB,OAAO;IACH,iCAAiC,CAC7B,SACA;KACI,iBAAiB;KACjB,cAAc;KACjB,CACJ;IACD,eAAe;IACf,oBAAoB;IACpB,4BAA4B;IAC5B,SAAS,CACL,SACA,aACH;IACD,wBAAwB,CACpB,SACA,EACH;IACD,8BAA8B,CAC1B,SACA,EAAE,WAAW,MAAM,CACtB;IACD,8BAA8B,CAC1B,SACA,SACH;IACD,qCAAqC,CACjC,SACA,6BACH;IACD,4BAA4B,CACxB,SACA,6BACH;IACD,uCAAuC,CACnC,SACA;KACI,YAAY;KACZ,MAAM;KACT,CACJ;IACD,8BAA8B,CAC1B,SACA;KACI;KACA,QAAQ;MACJ;MACA;MACA;MACA,CACI,WACA,eACH;MACD,CACI,YACA,gBACH;MACD,CACI,YACA,gBACH;MACD,CACI,UACA,cACH;MACD,CACI,WACA,eACH;MACD,CACI,SACA,aACH;MACD;MACA;MACH;KACD,YAAY;KACZ,iBAAiB;MACb;MACA;MACA;MACH;KACD,MAAM;KACT,CACJ;IACD,iCAAiC,CAC7B,SACA,6BACH;IACD,yCAAyC,CACrC,SACA,6BACH;IACD,2BAA2B,CACvB,SACA,6BACH;IACD,8BAA8B,CAC1B,SACA;KACI,GAAG;KACH,QAAQ;MACJ;MACA,CACI,eACA,OACH;MACD;MACA,CACI,oBACA,YACH;MACD;MACA,CACI,QACA,cACH;MACD;MACA,CACI,SACA,eACH;MACD;MACA,CACI,mBACA,WACH;MACJ;KACJ,CACJ;IACD,mCAAmC,CAC/B,SACA,6BACH;IACD,8BAA8B,CAC1B,SACA,6BACH;IACD,2BAA2B,CACvB,SACA,6BACH;IACD,kCAAkC,CAC9B,SACA;KACI,YAAY;KACZ,MAAM;KACT,CACJ;IACD,kCAAkC,CAC9B,SACA,6BACH;IACD,4CAA4C,CACxC,SACA,6BACH;IACD,gCAAgC;IAChC,gCAAgC;IAChC,0BAA0B;IAC1B,iBAAiB;IACjB,+BAA+B,CAC3B,SACA,EAAE,WAAW,MAAM,CACtB;IACD,+BAA+B,CAC3B,SACA;KACI,iBAAiB;MACb,YAAY;MACZ,UAAU;MACb;KACD,cAAc,EAAE,UAAU,GAAG;KAChC,CACJ;IACD,sBAAsB,CAClB,SACA,SACH;IACD,qBAAqB;KACjB;KACA;KACA,EAAE,iBAAiB,OAAO;KAC7B;IACD,+BAA+B,CAC3B,SACA,QACH;IACD,gBAAgB,CACZ,SACA,EACH;IACD,iBAAiB,CACb,QACA;KACI,MAAM;KACN,UAAU;KACb,CACJ;IACD,gCAAgC,CAC5B,SACA,EACI,WAAW;KACP,WAAW;KACX,aAAa;KAChB,EACJ,CACJ;IACD,yBAAyB;KACrB;KACA;KACA,EAAE,yBAAyB,OAAO;KACrC;IACD,uBAAuB;IACvB,8BAA8B,CAC1B,SACA;KACI,mBAAmB;MACf,eAAe;MACf,WAAW;MACd;KACD,mBAAmB;MACf,eAAe;MACf,WAAW;MACd;KACD,kBAAkB;MACd,eAAe;MACf,WAAW;MACd;KACD,eAAe;MACX,eAAe;MACf,WAAW;MACd;KACJ,CACJ;IACD,4BAA4B;KACxB;KACA;KACA,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE;KAClC;IACD,yCAAyC;KACrC;KACA;MACI,WAAW;MACX,MAAM;OACF;OACA;OACA;OACH;MACD,MAAM;MACT;KACD;MACI,WAAW;MACX,MAAM;MACN,MAAM,CACF,SACA,WACH;MACJ;KACJ;IACD,cAAc,CACV,SACA,SACH;IACD,sCAAsC,CAClC,SACA,cACH;IACD,mBAAmB;IACtB;GACJ;EACD;GACI,OAAO,CAAC,WAAW;GACnB,SAAS;IACL,0BAA0B;IAC1B,kBAAkB;IAClB;IACH;GACD,OAAO;IACH,2CAA2C;IAC3C,mCAAmC,CAC/B,SACA,EAAE,cAAc,MAAM,CACzB;IACD,0CAA0C;IAC1C,iBAAiB;IACjB,gCAAgC;IAChC,kDAAkD;IAClD,kCAAkC;IAClC,8CAA8C;IAC9C,6BAA6B;IAC7B,wBAAwB;IACxB,mBAAmB,CACf,SACA,EACI,OAAO;KACH;KACA;KACA;KACH,EACJ,CACJ;IACD,2BAA2B;IAC3B,gCAAgC;IAChC,gCAAgC;IAChC,+BAA+B;IAC/B,oCAAoC;IACpC,oCAAoC;IACpC,mBAAmB,CACf,SACA,EACH;IACD,+BAA+B,CAC3B,SACA;KACI,WAAW;KACX,YAAY;KACf,CACJ;IACD,eAAe,CACX,QACA;KACI,MAAM;KACN,UAAU;KACV,UAAU;KACb,CACJ;IACD,oBAAoB;IACpB,wBAAwB;IACxB,uBAAuB;IACvB,oCAAoC;IACpC,oBAAoB;IACpB,gCAAgC;IAChC,iBAAiB;IACjB,6BAA6B;IAC7B,oCAAoC;IACpC,8BAA8B;IAC9B,yBAAyB;IAC5B;GACJ;EACD;GACI,OAAO,CAAC,oBAAoB;GAC5B,OAAO;IACH,2BAA2B,CACvB,SACA;KACI,OAAO;MACH,SAAS;MACT,MAAM;MACT;KACD,aAAa;KAChB,CACJ;IACD,mBAAmB;KACf;KACA;KACA;MACI,eAAe;MACf,SAAS;MACZ;KACJ;IACJ;GACJ;EACJ;AAED,KAAI,SAAS,eAAe,OAAO,QAAQ,eAAe,aAAa,QAAQ,WAAW,KACtF,aAAY,OACR,GACA,GACA,wBAAwB,MAAM,EAC9B,wBAAwB,OAAO,EAC/B,wBAAwB,OAAO,CAClC;AAGL,QAAO,MACH;EACI,YAAY;EACZ,GAAG;EACN,EACD,GAAG,YACN;;AAGL,SAAS,wBAAwB,QAAsD;AACnF,QAAO;EACH,OAAO,CAAC,QAAQ,SAAS;EACzB,iBAAiB,EAAE,QAAQ,OAAO,aAAa;EAC/C,SAAS,EAAE,QAAQ;EACnB,OAAO,EACH,mBAAmB,CACf,SACA;GACI;GACA,YAAY;GACZ,aAAa;GACb,UAAU;GACb,CACJ,EACJ;EACJ;;AAGL,MAAa,MAAM,aAAa,MAAM;AACtC,MAAa,OAAO,aAAa,OAAO;AACxC,MAAa,MAAM,aACf,QACA;CACI,YAAY,EAAE,KAAK,MAAM;CACzB,KAAK;CACR,CACJ"}
|