@luxass/eslint-config 4.0.0-beta.9 → 4.0.1
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/README.md +351 -48
- package/dist/{chunk-TQ476NL2.mjs → chunk-4YBQZLPS.mjs} +13 -2
- package/dist/{chunk-NDNDG7BH.mjs → chunk-5NK24IKQ.mjs} +2 -5
- package/dist/{chunk-2SW2E3TH.mjs → chunk-5SDSWPKR.mjs} +14 -4
- package/dist/chunk-6T7MXPCT.mjs +17 -0
- package/dist/{chunk-SPQZTV4E.mjs → chunk-7R4FYLS2.mjs} +19 -14
- package/dist/{chunk-ADP4MYOS.mjs → chunk-ANUYBAYV.mjs} +1 -1
- package/dist/{chunk-R4NSLRAE.mjs → chunk-ATRL3UZP.mjs} +14 -8
- package/dist/{chunk-P3N5WLFL.mjs → chunk-BXBN56WI.mjs} +11 -7
- package/dist/chunk-CJ3ZUYUJ.mjs +183 -0
- package/dist/chunk-DAJA5AV3.mjs +29 -0
- package/dist/{chunk-FK567E7G.mjs → chunk-DVQQVCGF.mjs} +7 -3
- package/dist/chunk-FU5SRKZU.mjs +104 -0
- package/dist/{chunk-LQLF2CMA.mjs → chunk-GBLPCM3X.mjs} +14 -17
- package/dist/chunk-KJ7ZCBK4.mjs +48 -0
- package/dist/{chunk-QZTI72NS.mjs → chunk-PYS26PF3.mjs} +13 -9
- package/dist/chunk-Q57BF3CR.mjs +63 -0
- package/dist/{chunk-3QHLEAXK.mjs → chunk-RDZJT36Z.mjs} +22 -8
- package/dist/chunk-RNFKNSHW.mjs +293 -0
- package/dist/{chunk-HE56XDG6.mjs → chunk-RVSUTDCE.mjs} +15 -5
- package/dist/chunk-UMUUVFB7.mjs +69 -0
- package/dist/{chunk-NUG6FLHN.mjs → chunk-VZ2YFMWH.mjs} +54 -11
- package/dist/chunk-WDSV2EFG.mjs +7 -0
- package/dist/{chunk-M5WNLLBT.mjs → chunk-WOYZWHPM.mjs} +20 -7
- package/dist/chunk-WRURTO5T.mjs +144 -0
- package/dist/{chunk-BAKUP7QM.mjs → chunk-Z7F6QSYQ.mjs} +44 -34
- package/dist/configs/astro.cjs +11 -21
- package/dist/configs/astro.d.cts +3 -6
- package/dist/configs/astro.d.ts +3 -6
- package/dist/configs/astro.mjs +3 -3
- package/dist/configs/comments.cjs +9 -12
- package/dist/configs/comments.d.cts +3 -2
- package/dist/configs/comments.d.ts +3 -2
- package/dist/configs/comments.mjs +1 -2
- package/dist/configs/formatters.cjs +274 -0
- package/dist/configs/formatters.d.cts +11 -0
- package/dist/configs/formatters.d.ts +11 -0
- package/dist/configs/formatters.mjs +9 -0
- package/dist/configs/ignores.cjs +1 -8
- package/dist/configs/ignores.d.cts +3 -2
- package/dist/configs/ignores.d.ts +3 -2
- package/dist/configs/ignores.mjs +2 -2
- package/dist/configs/imports.cjs +35 -9
- package/dist/configs/imports.d.cts +13 -4
- package/dist/configs/imports.d.ts +13 -4
- package/dist/configs/imports.mjs +2 -2
- package/dist/configs/index.cjs +1487 -1074
- package/dist/configs/index.d.cts +7 -18
- package/dist/configs/index.d.ts +7 -18
- package/dist/configs/index.mjs +40 -36
- package/dist/configs/javascript.cjs +16 -23
- package/dist/configs/javascript.d.cts +3 -6
- package/dist/configs/javascript.d.ts +3 -6
- package/dist/configs/javascript.mjs +2 -3
- package/dist/configs/jsdoc.cjs +6 -2
- package/dist/configs/jsdoc.d.cts +17 -4
- package/dist/configs/jsdoc.d.ts +17 -4
- package/dist/configs/jsdoc.mjs +2 -2
- package/dist/configs/jsonc.cjs +8 -11
- package/dist/configs/jsonc.d.cts +3 -6
- package/dist/configs/jsonc.d.ts +3 -6
- package/dist/configs/jsonc.mjs +3 -3
- package/dist/configs/markdown.cjs +46 -35
- package/dist/configs/markdown.d.cts +25 -4
- package/dist/configs/markdown.d.ts +25 -4
- package/dist/configs/markdown.mjs +3 -3
- package/dist/configs/nextjs.cjs +13 -11
- package/dist/configs/nextjs.d.cts +3 -6
- package/dist/configs/nextjs.d.ts +3 -6
- package/dist/configs/nextjs.mjs +3 -3
- package/dist/configs/node.cjs +0 -10
- package/dist/configs/node.d.cts +3 -2
- package/dist/configs/node.d.ts +3 -2
- package/dist/configs/node.mjs +1 -2
- package/dist/configs/perfectionist.cjs +2 -20
- package/dist/configs/perfectionist.d.cts +4 -3
- package/dist/configs/perfectionist.d.ts +4 -3
- package/dist/configs/perfectionist.mjs +1 -2
- package/dist/configs/react.cjs +206 -203
- package/dist/configs/react.d.cts +3 -6
- package/dist/configs/react.d.ts +3 -6
- package/dist/configs/react.mjs +3 -3
- package/dist/configs/sort.cjs +6 -6
- package/dist/configs/sort.d.cts +3 -2
- package/dist/configs/sort.d.ts +3 -2
- package/dist/configs/sort.mjs +1 -1
- package/dist/configs/stylistic.cjs +20 -11
- package/dist/configs/stylistic.d.cts +4 -7
- package/dist/configs/stylistic.d.ts +4 -7
- package/dist/configs/stylistic.mjs +4 -3
- package/dist/configs/tailwindcss.cjs +33 -47
- package/dist/configs/tailwindcss.d.cts +3 -6
- package/dist/configs/tailwindcss.d.ts +3 -6
- package/dist/configs/tailwindcss.mjs +3 -3
- package/dist/configs/test.cjs +103 -16
- package/dist/configs/test.d.cts +3 -6
- package/dist/configs/test.d.ts +3 -6
- package/dist/configs/test.mjs +4 -3
- package/dist/configs/toml.cjs +131 -0
- package/dist/configs/toml.d.cts +11 -0
- package/dist/configs/toml.d.ts +11 -0
- package/dist/configs/toml.mjs +8 -0
- package/dist/configs/typescript.cjs +39 -43
- package/dist/configs/typescript.d.cts +3 -6
- package/dist/configs/typescript.d.ts +3 -6
- package/dist/configs/typescript.mjs +3 -4
- package/dist/configs/unicorn.cjs +13 -10
- package/dist/configs/unicorn.d.cts +3 -2
- package/dist/configs/unicorn.d.ts +3 -2
- package/dist/configs/unicorn.mjs +1 -2
- package/dist/configs/unocss.cjs +48 -20
- package/dist/configs/unocss.d.cts +3 -6
- package/dist/configs/unocss.d.ts +3 -6
- package/dist/configs/unocss.mjs +3 -3
- package/dist/configs/vue.cjs +51 -15
- package/dist/configs/vue.d.cts +3 -6
- package/dist/configs/vue.d.ts +3 -6
- package/dist/configs/vue.mjs +3 -3
- package/dist/configs/yaml.cjs +17 -11
- package/dist/configs/yaml.d.cts +3 -6
- package/dist/configs/yaml.d.ts +3 -6
- package/dist/configs/yaml.mjs +3 -3
- package/dist/custom-rules/utils.cjs +31 -0
- package/dist/custom-rules/utils.d.cts +6 -0
- package/dist/custom-rules/utils.d.ts +6 -0
- package/dist/custom-rules/utils.mjs +6 -0
- package/dist/globs.cjs +157 -0
- package/dist/globs.d.cts +28 -0
- package/dist/globs.d.ts +28 -0
- package/dist/globs.mjs +56 -0
- package/dist/index.cjs +1267 -839
- package/dist/index.d.cts +10 -44
- package/dist/index.d.ts +10 -44
- package/dist/index.mjs +106 -146
- package/dist/types-spTEGSaV.d.cts +632 -0
- package/dist/types-spTEGSaV.d.ts +632 -0
- package/package.json +69 -37
- package/dist/chunk-24KJPXII.mjs +0 -51
- package/dist/chunk-4HH6LYJ6.mjs +0 -25
- package/dist/chunk-AL47KNVD.mjs +0 -37
- package/dist/chunk-C5VMTRKT.mjs +0 -18
- package/dist/chunk-ERFDRAGW.mjs +0 -86
- package/dist/chunk-HLDEUDLN.mjs +0 -28
- package/dist/chunk-O4O6V7LI.mjs +0 -70
- package/dist/chunk-UBPIYSHC.mjs +0 -284
- package/dist/types-h9izbkUX.d.cts +0 -241
- package/dist/types-h9izbkUX.d.ts +0 -241
- package/dist/{chunk-FKAOMYGL.mjs → chunk-ME2OAMS3.mjs} +0 -0
- package/dist/{chunk-FOIFEV73.mjs → chunk-XBASVDU6.mjs} +6 -6
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/configs/formatters.ts
|
|
31
|
+
var formatters_exports = {};
|
|
32
|
+
__export(formatters_exports, {
|
|
33
|
+
formatters: () => formatters
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(formatters_exports);
|
|
36
|
+
var parserPlain = __toESM(require("eslint-parser-plain"), 1);
|
|
37
|
+
|
|
38
|
+
// src/globs.ts
|
|
39
|
+
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
40
|
+
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
41
|
+
var GLOB_CSS = "**/*.css";
|
|
42
|
+
var GLOB_POSTCSS = "**/*.{p,post}css";
|
|
43
|
+
var GLOB_LESS = "**/*.less";
|
|
44
|
+
var GLOB_SCSS = "**/*.scss";
|
|
45
|
+
var GLOB_MARKDOWN = "**/*.md";
|
|
46
|
+
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
47
|
+
var GLOB_TESTS = [
|
|
48
|
+
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
49
|
+
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
50
|
+
`**/*.test.${GLOB_SRC_EXT}`,
|
|
51
|
+
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
52
|
+
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
53
|
+
];
|
|
54
|
+
var GLOB_NEXTJS_ROUTES = [
|
|
55
|
+
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
56
|
+
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
57
|
+
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
58
|
+
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
59
|
+
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
60
|
+
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
61
|
+
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
62
|
+
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
63
|
+
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
// src/utils.ts
|
|
67
|
+
var import_node_process = __toESM(require("process"), 1);
|
|
68
|
+
var import_local_pkg = require("local-pkg");
|
|
69
|
+
async function interop(m) {
|
|
70
|
+
const resolved = await m;
|
|
71
|
+
return resolved.default || resolved;
|
|
72
|
+
}
|
|
73
|
+
async function ensure(packages) {
|
|
74
|
+
if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
;
|
|
78
|
+
const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
|
|
79
|
+
if (nonExistingPackages.length === 0) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
;
|
|
83
|
+
const { default: prompts } = await import("prompts");
|
|
84
|
+
const { result } = await prompts([
|
|
85
|
+
{
|
|
86
|
+
name: "result",
|
|
87
|
+
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
|
|
88
|
+
type: "confirm"
|
|
89
|
+
}
|
|
90
|
+
]);
|
|
91
|
+
if (result) {
|
|
92
|
+
await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
|
|
93
|
+
dev: true
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// src/configs/stylistic.ts
|
|
100
|
+
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
101
|
+
var StylisticConfigDefaults = {
|
|
102
|
+
indent: 2,
|
|
103
|
+
jsx: true,
|
|
104
|
+
quotes: "double",
|
|
105
|
+
semi: true
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// src/configs/formatters.ts
|
|
109
|
+
async function formatters(options = {}, stylistic = {}) {
|
|
110
|
+
await ensure([
|
|
111
|
+
"eslint-plugin-format"
|
|
112
|
+
]);
|
|
113
|
+
if (options === true) {
|
|
114
|
+
options = {
|
|
115
|
+
css: true,
|
|
116
|
+
graphql: true,
|
|
117
|
+
html: true,
|
|
118
|
+
markdown: true
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const {
|
|
122
|
+
indent,
|
|
123
|
+
quotes,
|
|
124
|
+
semi
|
|
125
|
+
} = {
|
|
126
|
+
...StylisticConfigDefaults,
|
|
127
|
+
...stylistic
|
|
128
|
+
};
|
|
129
|
+
const prettierOptions = Object.assign(
|
|
130
|
+
{
|
|
131
|
+
endOfLine: "auto",
|
|
132
|
+
semi,
|
|
133
|
+
singleQuote: quotes === "single",
|
|
134
|
+
tabWidth: typeof indent === "number" ? indent : 2,
|
|
135
|
+
trailingComma: "all",
|
|
136
|
+
useTabs: indent === "tab"
|
|
137
|
+
},
|
|
138
|
+
options.prettierOptions || {}
|
|
139
|
+
);
|
|
140
|
+
const dprintOptions = Object.assign(
|
|
141
|
+
{
|
|
142
|
+
indentWidth: typeof indent === "number" ? indent : 2,
|
|
143
|
+
quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
|
|
144
|
+
useTabs: indent === "tab"
|
|
145
|
+
},
|
|
146
|
+
options.dprintOptions || {}
|
|
147
|
+
);
|
|
148
|
+
const pluginFormat = await interop(import("eslint-plugin-format"));
|
|
149
|
+
const configs = [
|
|
150
|
+
{
|
|
151
|
+
name: "luxass:formatters:setup",
|
|
152
|
+
plugins: {
|
|
153
|
+
format: pluginFormat
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
];
|
|
157
|
+
if (options.css) {
|
|
158
|
+
configs.push(
|
|
159
|
+
{
|
|
160
|
+
name: "luxass:formatter:css",
|
|
161
|
+
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
162
|
+
languageOptions: {
|
|
163
|
+
parser: parserPlain
|
|
164
|
+
},
|
|
165
|
+
rules: {
|
|
166
|
+
"format/prettier": [
|
|
167
|
+
"error",
|
|
168
|
+
{
|
|
169
|
+
...prettierOptions,
|
|
170
|
+
parser: "css"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "luxass:formatter:scss",
|
|
177
|
+
files: [GLOB_SCSS],
|
|
178
|
+
languageOptions: {
|
|
179
|
+
parser: parserPlain
|
|
180
|
+
},
|
|
181
|
+
rules: {
|
|
182
|
+
"format/prettier": [
|
|
183
|
+
"error",
|
|
184
|
+
{
|
|
185
|
+
...prettierOptions,
|
|
186
|
+
parser: "scss"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "luxass:formatter:less",
|
|
193
|
+
files: [GLOB_LESS],
|
|
194
|
+
languageOptions: {
|
|
195
|
+
parser: parserPlain
|
|
196
|
+
},
|
|
197
|
+
rules: {
|
|
198
|
+
"format/prettier": [
|
|
199
|
+
"error",
|
|
200
|
+
{
|
|
201
|
+
...prettierOptions,
|
|
202
|
+
parser: "less"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
if (options.html) {
|
|
210
|
+
configs.push({
|
|
211
|
+
name: "luxass:formatter:html",
|
|
212
|
+
files: ["**/*.html"],
|
|
213
|
+
languageOptions: {
|
|
214
|
+
parser: parserPlain
|
|
215
|
+
},
|
|
216
|
+
rules: {
|
|
217
|
+
"format/prettier": [
|
|
218
|
+
"error",
|
|
219
|
+
{
|
|
220
|
+
...prettierOptions,
|
|
221
|
+
parser: "html"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (options.markdown) {
|
|
228
|
+
const formater = options.markdown === true ? "prettier" : options.markdown;
|
|
229
|
+
configs.push({
|
|
230
|
+
name: "luxass:formatter:markdown",
|
|
231
|
+
files: [GLOB_MARKDOWN],
|
|
232
|
+
languageOptions: {
|
|
233
|
+
parser: parserPlain
|
|
234
|
+
},
|
|
235
|
+
rules: {
|
|
236
|
+
[`format/${formater}`]: [
|
|
237
|
+
"error",
|
|
238
|
+
formater === "prettier" ? {
|
|
239
|
+
printWidth: 120,
|
|
240
|
+
...prettierOptions,
|
|
241
|
+
embeddedLanguageFormatting: "off",
|
|
242
|
+
parser: "markdown"
|
|
243
|
+
} : {
|
|
244
|
+
...dprintOptions,
|
|
245
|
+
language: "markdown"
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
if (options.graphql) {
|
|
252
|
+
configs.push({
|
|
253
|
+
name: "luxass:formatter:graphql",
|
|
254
|
+
files: ["**/*.graphql"],
|
|
255
|
+
languageOptions: {
|
|
256
|
+
parser: parserPlain
|
|
257
|
+
},
|
|
258
|
+
rules: {
|
|
259
|
+
"format/prettier": [
|
|
260
|
+
"error",
|
|
261
|
+
{
|
|
262
|
+
...prettierOptions,
|
|
263
|
+
parser: "graphql"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
return configs;
|
|
270
|
+
}
|
|
271
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
272
|
+
0 && (module.exports = {
|
|
273
|
+
formatters
|
|
274
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { F as FormattersOptions, i as formatters } from '../types-spTEGSaV.cjs';
|
|
2
|
+
import 'eslint-config-flat-gitignore';
|
|
3
|
+
import '@antfu/eslint-define-config';
|
|
4
|
+
import '@eslint-types/jsdoc/types';
|
|
5
|
+
import '@eslint-types/typescript-eslint/types';
|
|
6
|
+
import '@eslint-types/unicorn/types';
|
|
7
|
+
import 'eslint-plugin-antfu';
|
|
8
|
+
import '@stylistic/eslint-plugin';
|
|
9
|
+
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { F as FormattersOptions, i as formatters } from '../types-spTEGSaV.js';
|
|
2
|
+
import 'eslint-config-flat-gitignore';
|
|
3
|
+
import '@antfu/eslint-define-config';
|
|
4
|
+
import '@eslint-types/jsdoc/types';
|
|
5
|
+
import '@eslint-types/typescript-eslint/types';
|
|
6
|
+
import '@eslint-types/unicorn/types';
|
|
7
|
+
import 'eslint-plugin-antfu';
|
|
8
|
+
import '@stylistic/eslint-plugin';
|
|
9
|
+
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
package/dist/configs/ignores.cjs
CHANGED
|
@@ -26,9 +26,7 @@ module.exports = __toCommonJS(ignores_exports);
|
|
|
26
26
|
|
|
27
27
|
// src/globs.ts
|
|
28
28
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
29
|
-
var GLOB_SRC =
|
|
30
|
-
var GLOB_JSX_EXT = "[jt]sx";
|
|
31
|
-
var GLOB_JSX = `**/*.${GLOB_JSX_EXT}`;
|
|
29
|
+
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
32
30
|
var GLOB_MARKDOWN = "**/*.md";
|
|
33
31
|
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
34
32
|
var GLOB_TESTS = [
|
|
@@ -38,11 +36,6 @@ var GLOB_TESTS = [
|
|
|
38
36
|
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
39
37
|
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
40
38
|
];
|
|
41
|
-
var GLOB_NEXTJS_OG = [
|
|
42
|
-
`**/app/**/opengraph-image.${GLOB_JSX_EXT}`,
|
|
43
|
-
`**/app/**/twitter-image.${GLOB_JSX_EXT}`,
|
|
44
|
-
`**/app/**/route.${GLOB_JSX_EXT}`
|
|
45
|
-
];
|
|
46
39
|
var GLOB_NEXTJS_ROUTES = [
|
|
47
40
|
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
48
41
|
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as FlatConfigItem } from '../types-spTEGSaV.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,6 +7,8 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
|
11
12
|
|
|
12
13
|
declare function ignores(): FlatConfigItem[];
|
|
13
14
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as FlatConfigItem } from '../types-spTEGSaV.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,6 +7,8 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
|
11
12
|
|
|
12
13
|
declare function ignores(): FlatConfigItem[];
|
|
13
14
|
|
package/dist/configs/ignores.mjs
CHANGED
package/dist/configs/imports.cjs
CHANGED
|
@@ -33,15 +33,32 @@ __export(imports_exports, {
|
|
|
33
33
|
imports: () => imports
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(imports_exports);
|
|
36
|
-
|
|
37
|
-
// src/plugins.ts
|
|
36
|
+
var import_eslint_plugin_i = __toESM(require("eslint-plugin-i"), 1);
|
|
38
37
|
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
38
|
+
|
|
39
|
+
// src/globs.ts
|
|
40
|
+
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
41
|
+
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
42
|
+
var GLOB_MARKDOWN = "**/*.md";
|
|
43
|
+
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
44
|
+
var GLOB_TESTS = [
|
|
45
|
+
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
46
|
+
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
47
|
+
`**/*.test.${GLOB_SRC_EXT}`,
|
|
48
|
+
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
49
|
+
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
50
|
+
];
|
|
51
|
+
var GLOB_NEXTJS_ROUTES = [
|
|
52
|
+
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
53
|
+
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
54
|
+
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
55
|
+
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
56
|
+
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
57
|
+
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
58
|
+
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
59
|
+
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
60
|
+
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
61
|
+
];
|
|
45
62
|
|
|
46
63
|
// src/configs/imports.ts
|
|
47
64
|
async function imports(options = {}) {
|
|
@@ -53,10 +70,11 @@ async function imports(options = {}) {
|
|
|
53
70
|
name: "luxass:imports",
|
|
54
71
|
plugins: {
|
|
55
72
|
antfu: import_eslint_plugin_antfu.default,
|
|
56
|
-
import:
|
|
73
|
+
import: import_eslint_plugin_i.default
|
|
57
74
|
},
|
|
58
75
|
rules: {
|
|
59
76
|
"antfu/import-dedupe": "error",
|
|
77
|
+
"antfu/no-import-dist": "error",
|
|
60
78
|
"antfu/no-import-node-modules-by-path": "error",
|
|
61
79
|
"import/first": "error",
|
|
62
80
|
"import/no-duplicates": "error",
|
|
@@ -69,6 +87,14 @@ async function imports(options = {}) {
|
|
|
69
87
|
"import/newline-after-import": ["error", { considerComments: true, count: 1 }]
|
|
70
88
|
} : {}
|
|
71
89
|
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "luxass:imports:bin",
|
|
93
|
+
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
94
|
+
rules: {
|
|
95
|
+
"antfu/no-import-dist": "off",
|
|
96
|
+
"antfu/no-import-node-modules-by-path": "off"
|
|
97
|
+
}
|
|
72
98
|
}
|
|
73
99
|
];
|
|
74
100
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as StylisticConfig, k as FlatConfigItem } from '../types-spTEGSaV.cjs';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,7 +7,17 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
interface ImportsOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Enable stylistic rules.
|
|
16
|
+
*
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
stylistic?: boolean | StylisticConfig;
|
|
20
|
+
}
|
|
21
|
+
declare function imports(options?: ImportsOptions): Promise<FlatConfigItem[]>;
|
|
13
22
|
|
|
14
|
-
export { imports };
|
|
23
|
+
export { type ImportsOptions, imports };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as StylisticConfig, k as FlatConfigItem } from '../types-spTEGSaV.js';
|
|
2
2
|
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@typescript-eslint/parser';
|
|
4
3
|
import '@antfu/eslint-define-config';
|
|
5
4
|
import '@eslint-types/jsdoc/types';
|
|
6
5
|
import '@eslint-types/typescript-eslint/types';
|
|
@@ -8,7 +7,17 @@ import '@eslint-types/unicorn/types';
|
|
|
8
7
|
import 'eslint-plugin-antfu';
|
|
9
8
|
import '@stylistic/eslint-plugin';
|
|
10
9
|
import 'eslint';
|
|
10
|
+
import '@typescript-eslint/parser';
|
|
11
|
+
import 'eslint-processor-vue-blocks';
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
interface ImportsOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Enable stylistic rules.
|
|
16
|
+
*
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
stylistic?: boolean | StylisticConfig;
|
|
20
|
+
}
|
|
21
|
+
declare function imports(options?: ImportsOptions): Promise<FlatConfigItem[]>;
|
|
13
22
|
|
|
14
|
-
export { imports };
|
|
23
|
+
export { type ImportsOptions, imports };
|