@luxass/eslint-config 4.2.6 → 4.2.8
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 +4 -5
- package/dist/index.cjs +165 -446
- package/dist/index.d.cts +733 -12
- package/dist/index.d.ts +733 -12
- package/dist/{configs/index.cjs → index.js} +308 -516
- package/package.json +51 -85
- package/dist/chunk-2IR43M6N.mjs +0 -48
- package/dist/chunk-47ISSTHW.mjs +0 -291
- package/dist/chunk-4YBQZLPS.mjs +0 -68
- package/dist/chunk-4YT54JFZ.mjs +0 -48
- package/dist/chunk-5NK24IKQ.mjs +0 -26
- package/dist/chunk-AJS3TMZE.mjs +0 -63
- package/dist/chunk-C6FE5KXJ.mjs +0 -104
- package/dist/chunk-DAJA5AV3.mjs +0 -29
- package/dist/chunk-DCOLHWHC.mjs +0 -269
- package/dist/chunk-E4RVBKZB.mjs +0 -207
- package/dist/chunk-HZNHG5PB.mjs +0 -45
- package/dist/chunk-KOXCJL3C.mjs +0 -109
- package/dist/chunk-PFCAWBCD.mjs +0 -93
- package/dist/chunk-PFYV2TWZ.mjs +0 -117
- package/dist/chunk-QT6FHTFU.mjs +0 -92
- package/dist/chunk-RDZJT36Z.mjs +0 -57
- package/dist/chunk-RVSUTDCE.mjs +0 -57
- package/dist/chunk-TWAETZPX.mjs +0 -149
- package/dist/chunk-WSQOWO67.mjs +0 -16
- package/dist/chunk-XBASVDU6.mjs +0 -215
- package/dist/chunk-XD3UVRU7.mjs +0 -274
- package/dist/chunk-XGI647GZ.mjs +0 -81
- package/dist/chunk-XMXYE5WC.mjs +0 -183
- package/dist/chunk-YNMFVYL6.mjs +0 -69
- package/dist/chunk-YO3IYQ2L.mjs +0 -220
- package/dist/chunk-YZCJUX6Z.mjs +0 -0
- package/dist/configs/comments.cjs +0 -63
- package/dist/configs/comments.d.cts +0 -15
- package/dist/configs/comments.d.ts +0 -15
- package/dist/configs/comments.mjs +0 -6
- package/dist/configs/css/tailwindcss.cjs +0 -148
- package/dist/configs/css/tailwindcss.d.cts +0 -11
- package/dist/configs/css/tailwindcss.d.ts +0 -11
- package/dist/configs/css/tailwindcss.mjs +0 -8
- package/dist/configs/css/unocss.cjs +0 -133
- package/dist/configs/css/unocss.d.cts +0 -11
- package/dist/configs/css/unocss.d.ts +0 -11
- package/dist/configs/css/unocss.mjs +0 -8
- package/dist/configs/data/json.cjs +0 -155
- package/dist/configs/data/json.d.cts +0 -11
- package/dist/configs/data/json.d.ts +0 -11
- package/dist/configs/data/json.mjs +0 -8
- package/dist/configs/data/toml.cjs +0 -131
- package/dist/configs/data/toml.d.cts +0 -11
- package/dist/configs/data/toml.d.ts +0 -11
- package/dist/configs/data/toml.mjs +0 -8
- package/dist/configs/data/yaml.cjs +0 -143
- package/dist/configs/data/yaml.d.cts +0 -11
- package/dist/configs/data/yaml.d.ts +0 -11
- package/dist/configs/data/yaml.mjs +0 -8
- package/dist/configs/docs/jsdoc.cjs +0 -85
- package/dist/configs/docs/jsdoc.d.cts +0 -27
- package/dist/configs/docs/jsdoc.d.ts +0 -27
- package/dist/configs/docs/jsdoc.mjs +0 -7
- package/dist/configs/docs/markdown.cjs +0 -164
- package/dist/configs/docs/markdown.d.cts +0 -35
- package/dist/configs/docs/markdown.d.ts +0 -35
- package/dist/configs/docs/markdown.mjs +0 -8
- package/dist/configs/formatters.cjs +0 -274
- package/dist/configs/formatters.d.cts +0 -11
- package/dist/configs/formatters.d.ts +0 -11
- package/dist/configs/formatters.mjs +0 -9
- package/dist/configs/frameworks/astro.cjs +0 -179
- package/dist/configs/frameworks/astro.d.cts +0 -11
- package/dist/configs/frameworks/astro.d.ts +0 -11
- package/dist/configs/frameworks/astro.mjs +0 -8
- package/dist/configs/frameworks/nextjs.cjs +0 -180
- package/dist/configs/frameworks/nextjs.d.cts +0 -11
- package/dist/configs/frameworks/nextjs.d.ts +0 -11
- package/dist/configs/frameworks/nextjs.mjs +0 -8
- package/dist/configs/frameworks/react.cjs +0 -377
- package/dist/configs/frameworks/react.d.cts +0 -11
- package/dist/configs/frameworks/react.d.ts +0 -11
- package/dist/configs/frameworks/react.mjs +0 -8
- package/dist/configs/frameworks/solid.cjs +0 -360
- package/dist/configs/frameworks/solid.d.cts +0 -11
- package/dist/configs/frameworks/solid.d.ts +0 -11
- package/dist/configs/frameworks/solid.mjs +0 -8
- package/dist/configs/frameworks/vue.cjs +0 -293
- package/dist/configs/frameworks/vue.d.cts +0 -11
- package/dist/configs/frameworks/vue.d.ts +0 -11
- package/dist/configs/frameworks/vue.mjs +0 -8
- package/dist/configs/ignores.cjs +0 -96
- package/dist/configs/ignores.d.cts +0 -15
- package/dist/configs/ignores.d.ts +0 -15
- package/dist/configs/ignores.mjs +0 -7
- package/dist/configs/imports.cjs +0 -104
- package/dist/configs/imports.d.cts +0 -23
- package/dist/configs/imports.d.ts +0 -23
- package/dist/configs/imports.mjs +0 -7
- package/dist/configs/index.d.cts +0 -19
- package/dist/configs/index.d.ts +0 -19
- package/dist/configs/index.mjs +0 -99
- package/dist/configs/javascript.cjs +0 -324
- package/dist/configs/javascript.d.cts +0 -11
- package/dist/configs/javascript.d.ts +0 -11
- package/dist/configs/javascript.mjs +0 -7
- package/dist/configs/node.cjs +0 -60
- package/dist/configs/node.d.cts +0 -15
- package/dist/configs/node.d.ts +0 -15
- package/dist/configs/node.mjs +0 -6
- package/dist/configs/sort.cjs +0 -240
- package/dist/configs/sort.d.cts +0 -26
- package/dist/configs/sort.d.ts +0 -26
- package/dist/configs/sort.mjs +0 -8
- package/dist/configs/stylistic.cjs +0 -98
- package/dist/configs/stylistic.d.cts +0 -11
- package/dist/configs/stylistic.d.ts +0 -11
- package/dist/configs/stylistic.mjs +0 -9
- package/dist/configs/test.cjs +0 -210
- package/dist/configs/test.d.cts +0 -11
- package/dist/configs/test.d.ts +0 -11
- package/dist/configs/test.mjs +0 -8
- package/dist/configs/typescript.cjs +0 -291
- package/dist/configs/typescript.d.cts +0 -11
- package/dist/configs/typescript.d.ts +0 -11
- package/dist/configs/typescript.mjs +0 -8
- package/dist/configs/unicorn.cjs +0 -91
- package/dist/configs/unicorn.d.cts +0 -15
- package/dist/configs/unicorn.d.ts +0 -15
- package/dist/configs/unicorn.mjs +0 -6
- package/dist/globs.cjs +0 -158
- package/dist/globs.d.cts +0 -28
- package/dist/globs.d.ts +0 -28
- package/dist/globs.mjs +0 -56
- package/dist/index.mjs +0 -278
- package/dist/types-HqEzZfQU.d.cts +0 -668
- package/dist/types-HqEzZfQU.d.ts +0 -668
package/dist/chunk-YO3IYQ2L.mjs
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interop,
|
|
3
|
-
renameRules,
|
|
4
|
-
toArray
|
|
5
|
-
} from "./chunk-4YBQZLPS.mjs";
|
|
6
|
-
import {
|
|
7
|
-
GLOB_SRC,
|
|
8
|
-
GLOB_SRC_EXT,
|
|
9
|
-
GLOB_TS,
|
|
10
|
-
GLOB_TSX
|
|
11
|
-
} from "./chunk-KOXCJL3C.mjs";
|
|
12
|
-
|
|
13
|
-
// src/configs/typescript.ts
|
|
14
|
-
import process from "node:process";
|
|
15
|
-
import pluginAntfu from "eslint-plugin-antfu";
|
|
16
|
-
async function typescript(options = {}) {
|
|
17
|
-
const {
|
|
18
|
-
exts = [],
|
|
19
|
-
overrides = {},
|
|
20
|
-
parserOptions = {}
|
|
21
|
-
} = options ?? {};
|
|
22
|
-
const files = options.files ?? [
|
|
23
|
-
GLOB_SRC,
|
|
24
|
-
...exts.map((ext) => `**/*.${ext}`)
|
|
25
|
-
];
|
|
26
|
-
const filesTypeAware = options.typeAwareFileS ?? [GLOB_TS, GLOB_TSX];
|
|
27
|
-
const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
|
|
28
|
-
const isTypeAware = !!tsconfigPath;
|
|
29
|
-
const typeAwareRules = {
|
|
30
|
-
"dot-notation": "off",
|
|
31
|
-
"no-implied-eval": "off",
|
|
32
|
-
"no-throw-literal": "off",
|
|
33
|
-
"ts/await-thenable": "error",
|
|
34
|
-
"ts/dot-notation": ["error", { allowKeywords: true }],
|
|
35
|
-
"ts/no-floating-promises": "error",
|
|
36
|
-
"ts/no-for-in-array": "error",
|
|
37
|
-
"ts/no-implied-eval": "error",
|
|
38
|
-
"ts/no-misused-promises": "error",
|
|
39
|
-
"ts/no-throw-literal": "error",
|
|
40
|
-
"ts/no-unnecessary-type-assertion": "error",
|
|
41
|
-
"ts/no-unsafe-argument": "error",
|
|
42
|
-
"ts/no-unsafe-assignment": "error",
|
|
43
|
-
"ts/no-unsafe-call": "error",
|
|
44
|
-
"ts/no-unsafe-member-access": "error",
|
|
45
|
-
"ts/no-unsafe-return": "error",
|
|
46
|
-
"ts/restrict-plus-operands": "error",
|
|
47
|
-
"ts/restrict-template-expressions": "error",
|
|
48
|
-
"ts/unbound-method": "error"
|
|
49
|
-
};
|
|
50
|
-
const [
|
|
51
|
-
pluginTs,
|
|
52
|
-
parserTs
|
|
53
|
-
] = await Promise.all([
|
|
54
|
-
interop(import("@typescript-eslint/eslint-plugin")),
|
|
55
|
-
interop(import("@typescript-eslint/parser"))
|
|
56
|
-
]);
|
|
57
|
-
function makeParser(typeAware, files2, ignores) {
|
|
58
|
-
return {
|
|
59
|
-
files: files2,
|
|
60
|
-
...ignores ? { ignores } : {},
|
|
61
|
-
name: `luxass:typescript:${typeAware ? "type-aware-parser" : "parser"}`,
|
|
62
|
-
languageOptions: {
|
|
63
|
-
parser: parserTs,
|
|
64
|
-
parserOptions: {
|
|
65
|
-
extraFileExtensions: exts.map((ext) => `.${ext}`),
|
|
66
|
-
sourceType: "module",
|
|
67
|
-
...typeAware ? {
|
|
68
|
-
project: tsconfigPath,
|
|
69
|
-
tsconfigRootDir: process.cwd()
|
|
70
|
-
} : {},
|
|
71
|
-
...parserOptions
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
return [
|
|
77
|
-
{
|
|
78
|
-
// Install the plugins without globs, so they can be configured separately.
|
|
79
|
-
name: "luxass:typescript:setup",
|
|
80
|
-
plugins: {
|
|
81
|
-
antfu: pluginAntfu,
|
|
82
|
-
ts: pluginTs
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
...isTypeAware ? [
|
|
86
|
-
makeParser(true, filesTypeAware),
|
|
87
|
-
makeParser(false, files, filesTypeAware)
|
|
88
|
-
] : [makeParser(false, files)],
|
|
89
|
-
{
|
|
90
|
-
name: "luxass:typescript:rules",
|
|
91
|
-
files,
|
|
92
|
-
rules: {
|
|
93
|
-
...renameRules(
|
|
94
|
-
pluginTs.configs["eslint-recommended"].overrides[0].rules,
|
|
95
|
-
"@typescript-eslint/",
|
|
96
|
-
"ts/"
|
|
97
|
-
),
|
|
98
|
-
...renameRules(
|
|
99
|
-
pluginTs.configs.strict.rules,
|
|
100
|
-
"@typescript-eslint/",
|
|
101
|
-
"ts/"
|
|
102
|
-
),
|
|
103
|
-
"no-dupe-class-members": "off",
|
|
104
|
-
"no-invalid-this": "off",
|
|
105
|
-
"no-loss-of-precision": "off",
|
|
106
|
-
"no-redeclare": "off",
|
|
107
|
-
"no-use-before-define": "off",
|
|
108
|
-
"no-useless-constructor": "off",
|
|
109
|
-
"ts/ban-ts-comment": [
|
|
110
|
-
"error",
|
|
111
|
-
{ "ts-ignore": "allow-with-description" }
|
|
112
|
-
],
|
|
113
|
-
"ts/ban-types": ["error", {
|
|
114
|
-
extendDefaults: false,
|
|
115
|
-
types: {
|
|
116
|
-
BigInt: {
|
|
117
|
-
fixWith: "bigint",
|
|
118
|
-
message: "Use `bigint` instead."
|
|
119
|
-
},
|
|
120
|
-
Boolean: {
|
|
121
|
-
fixWith: "boolean",
|
|
122
|
-
message: "Use `boolean` instead."
|
|
123
|
-
},
|
|
124
|
-
Function: "Use a specific function type instead, like `() => void`.",
|
|
125
|
-
Number: {
|
|
126
|
-
fixWith: "number",
|
|
127
|
-
message: "Use `number` instead."
|
|
128
|
-
},
|
|
129
|
-
Object: {
|
|
130
|
-
fixWith: "Record<string, unknown>",
|
|
131
|
-
message: "The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848"
|
|
132
|
-
},
|
|
133
|
-
String: {
|
|
134
|
-
fixWith: "string",
|
|
135
|
-
message: "Use `string` instead."
|
|
136
|
-
},
|
|
137
|
-
Symbol: {
|
|
138
|
-
fixWith: "symbol",
|
|
139
|
-
message: "Use `symbol` instead."
|
|
140
|
-
},
|
|
141
|
-
object: {
|
|
142
|
-
fixWith: "Record<string, unknown>",
|
|
143
|
-
message: "The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}],
|
|
147
|
-
"ts/consistent-type-definitions": ["error", "interface"],
|
|
148
|
-
"ts/consistent-type-imports": [
|
|
149
|
-
"error",
|
|
150
|
-
{ disallowTypeAnnotations: false, prefer: "type-imports" }
|
|
151
|
-
],
|
|
152
|
-
"ts/no-dupe-class-members": "error",
|
|
153
|
-
"ts/no-dynamic-delete": "off",
|
|
154
|
-
"ts/no-explicit-any": "off",
|
|
155
|
-
"ts/no-extraneous-class": "off",
|
|
156
|
-
"ts/no-import-type-side-effects": "error",
|
|
157
|
-
"ts/no-invalid-this": "error",
|
|
158
|
-
"ts/no-invalid-void-type": "off",
|
|
159
|
-
"ts/no-loss-of-precision": "error",
|
|
160
|
-
"ts/no-non-null-assertion": "off",
|
|
161
|
-
"ts/no-redeclare": "error",
|
|
162
|
-
"ts/no-require-imports": "error",
|
|
163
|
-
"ts/no-unused-vars": "off",
|
|
164
|
-
"ts/no-use-before-define": [
|
|
165
|
-
"error",
|
|
166
|
-
{ classes: false, functions: false, variables: true }
|
|
167
|
-
],
|
|
168
|
-
"ts/no-useless-constructor": "off",
|
|
169
|
-
"ts/prefer-ts-expect-error": "error",
|
|
170
|
-
"ts/triple-slash-reference": "off",
|
|
171
|
-
"ts/unified-signatures": "off",
|
|
172
|
-
...overrides
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
name: "luxass:typescript:rules-type-aware",
|
|
177
|
-
files: filesTypeAware,
|
|
178
|
-
rules: {
|
|
179
|
-
...tsconfigPath ? typeAwareRules : {},
|
|
180
|
-
...overrides
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
name: "luxass:typescript:dts-overrides",
|
|
185
|
-
files: ["**/*.d.ts"],
|
|
186
|
-
rules: {
|
|
187
|
-
"eslint-comments/no-unlimited-disable": "off",
|
|
188
|
-
"import/no-duplicates": "off",
|
|
189
|
-
"no-restricted-syntax": "off",
|
|
190
|
-
"unused-imports/no-unused-vars": "off"
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: "luxass:typescript:tests-overrides",
|
|
195
|
-
files: ["**/*.{test,spec}.ts?(x)"],
|
|
196
|
-
rules: {
|
|
197
|
-
"no-unused-expressions": "off"
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
name: "luxass:typescript:playground-overrides",
|
|
202
|
-
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
203
|
-
rules: {
|
|
204
|
-
"no-console": "off"
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: "luxass:typescript:javascript-overrides",
|
|
209
|
-
files: ["**/*.js", "**/*.cjs"],
|
|
210
|
-
rules: {
|
|
211
|
-
"ts/no-require-imports": "off",
|
|
212
|
-
"ts/no-var-requires": "off"
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
];
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export {
|
|
219
|
-
typescript
|
|
220
|
-
};
|
package/dist/chunk-YZCJUX6Z.mjs
DELETED
|
File without changes
|
|
@@ -1,63 +0,0 @@
|
|
|
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/comments.ts
|
|
31
|
-
var comments_exports = {};
|
|
32
|
-
__export(comments_exports, {
|
|
33
|
-
comments: () => comments
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(comments_exports);
|
|
36
|
-
var import_eslint_plugin_eslint_comments = __toESM(require("@eslint-community/eslint-plugin-eslint-comments"), 1);
|
|
37
|
-
async function comments() {
|
|
38
|
-
return [
|
|
39
|
-
{
|
|
40
|
-
name: "luxass:eslint-comments",
|
|
41
|
-
plugins: {
|
|
42
|
-
"eslint-comments": import_eslint_plugin_eslint_comments.default
|
|
43
|
-
},
|
|
44
|
-
rules: {
|
|
45
|
-
// https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/disable-enable-pair.md
|
|
46
|
-
"eslint-comments/disable-enable-pair": "error",
|
|
47
|
-
// https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/no-aggregating-enable.md
|
|
48
|
-
"eslint-comments/no-aggregating-enable": "error",
|
|
49
|
-
// https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/no-duplicate-disable.md
|
|
50
|
-
"eslint-comments/no-duplicate-disable": "error",
|
|
51
|
-
// https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/no-unlimited-disable.md
|
|
52
|
-
"eslint-comments/no-unlimited-disable": "error",
|
|
53
|
-
// Deprecated in favor of official reportUnusedDisableDirectives
|
|
54
|
-
// https://github.com/eslint-community/eslint-plugin-eslint-comments/issues/133
|
|
55
|
-
"eslint-comments/no-unused-enable": "off"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
];
|
|
59
|
-
}
|
|
60
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
-
0 && (module.exports = {
|
|
62
|
-
comments
|
|
63
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { p as FlatConfigItem } from '../types-HqEzZfQU.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';
|
|
12
|
-
|
|
13
|
-
declare function comments(): Promise<FlatConfigItem[]>;
|
|
14
|
-
|
|
15
|
-
export { comments };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { p as FlatConfigItem } from '../types-HqEzZfQU.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';
|
|
12
|
-
|
|
13
|
-
declare function comments(): Promise<FlatConfigItem[]>;
|
|
14
|
-
|
|
15
|
-
export { comments };
|
|
@@ -1,148 +0,0 @@
|
|
|
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/css/tailwindcss.ts
|
|
31
|
-
var tailwindcss_exports = {};
|
|
32
|
-
__export(tailwindcss_exports, {
|
|
33
|
-
tailwindcss: () => tailwindcss
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(tailwindcss_exports);
|
|
36
|
-
|
|
37
|
-
// src/globs.ts
|
|
38
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
39
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
40
|
-
var GLOB_MARKDOWN = "**/*.md";
|
|
41
|
-
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
42
|
-
var GLOB_TESTS = [
|
|
43
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
44
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
45
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
46
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
47
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
48
|
-
];
|
|
49
|
-
var GLOB_NEXTJS_ROUTES = [
|
|
50
|
-
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
51
|
-
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
52
|
-
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
53
|
-
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
54
|
-
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
55
|
-
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
56
|
-
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
57
|
-
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
58
|
-
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
// src/utils.ts
|
|
62
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
63
|
-
var import_local_pkg = require("local-pkg");
|
|
64
|
-
async function interop(m) {
|
|
65
|
-
const resolved = await m;
|
|
66
|
-
return resolved.default || resolved;
|
|
67
|
-
}
|
|
68
|
-
async function ensure(packages) {
|
|
69
|
-
if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
;
|
|
73
|
-
const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
|
|
74
|
-
if (nonExistingPackages.length === 0) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
;
|
|
78
|
-
const { default: prompts } = await import("prompts");
|
|
79
|
-
const { result } = await prompts([
|
|
80
|
-
{
|
|
81
|
-
name: "result",
|
|
82
|
-
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
|
|
83
|
-
type: "confirm"
|
|
84
|
-
}
|
|
85
|
-
]);
|
|
86
|
-
if (result) {
|
|
87
|
-
await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
|
|
88
|
-
dev: true
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// src/configs/css/tailwindcss.ts
|
|
95
|
-
async function tailwindcss(options = {}) {
|
|
96
|
-
const {
|
|
97
|
-
files = [GLOB_SRC],
|
|
98
|
-
overrides
|
|
99
|
-
} = options;
|
|
100
|
-
await ensure([
|
|
101
|
-
"eslint-plugin-tailwindcss"
|
|
102
|
-
]);
|
|
103
|
-
const [
|
|
104
|
-
pluginTailwindCSS
|
|
105
|
-
] = await Promise.all([
|
|
106
|
-
interop(import("eslint-plugin-tailwindcss"))
|
|
107
|
-
]);
|
|
108
|
-
return [
|
|
109
|
-
{
|
|
110
|
-
name: "luxass:tailwindcss:setup",
|
|
111
|
-
languageOptions: {
|
|
112
|
-
parserOptions: {
|
|
113
|
-
ecmaFeatures: {
|
|
114
|
-
jsx: true
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
plugins: {
|
|
119
|
-
tailwind: pluginTailwindCSS
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: "luxass:tailwindcss:rules",
|
|
124
|
-
files,
|
|
125
|
-
rules: {
|
|
126
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/classnames-order.md
|
|
127
|
-
"tailwind/classnames-order": "warn",
|
|
128
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/enforces-negative-arbitrary-values.md
|
|
129
|
-
"tailwind/enforces-negative-arbitrary-values": "warn",
|
|
130
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/enforces-shorthand.md
|
|
131
|
-
"tailwind/enforces-shorthand": "warn",
|
|
132
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/migration-from-tailwind-2.md
|
|
133
|
-
"tailwind/migration-from-tailwind-2": "warn",
|
|
134
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-arbitrary-value.md
|
|
135
|
-
"tailwind/no-arbitrary-value": "off",
|
|
136
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-contradicting-classname.md
|
|
137
|
-
"tailwind/no-contradicting-classname": "error",
|
|
138
|
-
// https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-custom-classname.md
|
|
139
|
-
"tailwind/no-custom-classname": "warn",
|
|
140
|
-
...overrides
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
];
|
|
144
|
-
}
|
|
145
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
146
|
-
0 && (module.exports = {
|
|
147
|
-
tailwindcss
|
|
148
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { h as TailwindCSSOptions, g as tailwindcss } from '../../types-HqEzZfQU.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';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { h as TailwindCSSOptions, g as tailwindcss } from '../../types-HqEzZfQU.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';
|
|
@@ -1,133 +0,0 @@
|
|
|
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/css/unocss.ts
|
|
31
|
-
var unocss_exports = {};
|
|
32
|
-
__export(unocss_exports, {
|
|
33
|
-
unocss: () => unocss
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(unocss_exports);
|
|
36
|
-
|
|
37
|
-
// src/globs.ts
|
|
38
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
39
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
40
|
-
var GLOB_MARKDOWN = "**/*.md";
|
|
41
|
-
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
42
|
-
var GLOB_TESTS = [
|
|
43
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
44
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
45
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
46
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
47
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
48
|
-
];
|
|
49
|
-
var GLOB_NEXTJS_ROUTES = [
|
|
50
|
-
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
51
|
-
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
52
|
-
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
53
|
-
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
54
|
-
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
55
|
-
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
56
|
-
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
57
|
-
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
58
|
-
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
// src/utils.ts
|
|
62
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
63
|
-
var import_local_pkg = require("local-pkg");
|
|
64
|
-
async function interop(m) {
|
|
65
|
-
const resolved = await m;
|
|
66
|
-
return resolved.default || resolved;
|
|
67
|
-
}
|
|
68
|
-
async function ensure(packages) {
|
|
69
|
-
if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
;
|
|
73
|
-
const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
|
|
74
|
-
if (nonExistingPackages.length === 0) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
;
|
|
78
|
-
const { default: prompts } = await import("prompts");
|
|
79
|
-
const { result } = await prompts([
|
|
80
|
-
{
|
|
81
|
-
name: "result",
|
|
82
|
-
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
|
|
83
|
-
type: "confirm"
|
|
84
|
-
}
|
|
85
|
-
]);
|
|
86
|
-
if (result) {
|
|
87
|
-
await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
|
|
88
|
-
dev: true
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// src/configs/css/unocss.ts
|
|
95
|
-
async function unocss(options = {}) {
|
|
96
|
-
const {
|
|
97
|
-
attributify = true,
|
|
98
|
-
files = [GLOB_SRC],
|
|
99
|
-
overrides,
|
|
100
|
-
strict = false
|
|
101
|
-
} = options;
|
|
102
|
-
await ensure([
|
|
103
|
-
"@unocss/eslint-plugin"
|
|
104
|
-
]);
|
|
105
|
-
const [
|
|
106
|
-
pluginUnoCSS
|
|
107
|
-
] = await Promise.all([
|
|
108
|
-
interop(import("@unocss/eslint-plugin"))
|
|
109
|
-
]);
|
|
110
|
-
return [
|
|
111
|
-
{
|
|
112
|
-
name: "luxass:unocss",
|
|
113
|
-
files,
|
|
114
|
-
plugins: {
|
|
115
|
-
unocss: pluginUnoCSS
|
|
116
|
-
},
|
|
117
|
-
rules: {
|
|
118
|
-
"unocss/order": "warn",
|
|
119
|
-
...attributify ? {
|
|
120
|
-
"unocss/order-attributify": "warn"
|
|
121
|
-
} : {},
|
|
122
|
-
...strict ? {
|
|
123
|
-
"unocss/blocklist": "error"
|
|
124
|
-
} : {},
|
|
125
|
-
...overrides
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
];
|
|
129
|
-
}
|
|
130
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
131
|
-
0 && (module.exports = {
|
|
132
|
-
unocss
|
|
133
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { U as UnoCSSOptions, u as unocss } from '../../types-HqEzZfQU.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';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { U as UnoCSSOptions, u as unocss } from '../../types-HqEzZfQU.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';
|