@luxass/eslint-config 4.2.5 → 4.2.7
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 +35 -54
- package/dist/index.cjs +166 -479
- package/dist/index.d.cts +733 -12
- package/dist/index.d.ts +733 -12
- package/dist/{configs/index.cjs → index.js} +300 -542
- package/package.json +51 -86
- package/dist/chunk-4YBQZLPS.mjs +0 -68
- package/dist/chunk-4YT54JFZ.mjs +0 -48
- package/dist/chunk-5NK24IKQ.mjs +0 -26
- package/dist/chunk-6T7MXPCT.mjs +0 -17
- package/dist/chunk-7ODEIBF5.mjs +0 -144
- package/dist/chunk-AQRBQAKE.mjs +0 -48
- package/dist/chunk-DAJA5AV3.mjs +0 -29
- package/dist/chunk-DCOLHWHC.mjs +0 -269
- package/dist/chunk-DVQQVCGF.mjs +0 -45
- package/dist/chunk-EHWA727G.mjs +0 -69
- package/dist/chunk-FNOIGW47.mjs +0 -104
- package/dist/chunk-KOXCJL3C.mjs +0 -109
- package/dist/chunk-MMSZW2UW.mjs +0 -92
- package/dist/chunk-MT5P5EKH.mjs +0 -207
- package/dist/chunk-O2BXTQHK.mjs +0 -117
- package/dist/chunk-QDSV5ONX.mjs +0 -93
- package/dist/chunk-QMGT2Z63.mjs +0 -57
- package/dist/chunk-RVSUTDCE.mjs +0 -57
- package/dist/chunk-SPD4DGYN.mjs +0 -274
- package/dist/chunk-UITQW3RA.mjs +0 -293
- package/dist/chunk-V57HXOSW.mjs +0 -81
- package/dist/chunk-WDSV2EFG.mjs +0 -7
- package/dist/chunk-WOBGA3K2.mjs +0 -63
- package/dist/chunk-WSQOWO67.mjs +0 -16
- package/dist/chunk-XBASVDU6.mjs +0 -215
- package/dist/chunk-XPKGXA67.mjs +0 -183
- package/dist/chunk-YGZJUKJC.mjs +0 -0
- package/dist/chunk-YO3IYQ2L.mjs +0 -220
- package/dist/configs/astro.cjs +0 -179
- package/dist/configs/astro.d.cts +0 -11
- package/dist/configs/astro.d.ts +0 -11
- package/dist/configs/astro.mjs +0 -8
- 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/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/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 -20
- package/dist/configs/index.d.ts +0 -20
- package/dist/configs/index.mjs +0 -104
- 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/jsdoc.cjs +0 -85
- package/dist/configs/jsdoc.d.cts +0 -27
- package/dist/configs/jsdoc.d.ts +0 -27
- package/dist/configs/jsdoc.mjs +0 -7
- package/dist/configs/jsonc.cjs +0 -155
- package/dist/configs/jsonc.d.cts +0 -11
- package/dist/configs/jsonc.d.ts +0 -11
- package/dist/configs/jsonc.mjs +0 -8
- package/dist/configs/markdown.cjs +0 -164
- package/dist/configs/markdown.d.cts +0 -35
- package/dist/configs/markdown.d.ts +0 -35
- package/dist/configs/markdown.mjs +0 -8
- package/dist/configs/nextjs.cjs +0 -180
- package/dist/configs/nextjs.d.cts +0 -11
- package/dist/configs/nextjs.d.ts +0 -11
- package/dist/configs/nextjs.mjs +0 -8
- 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/perfectionist.cjs +0 -51
- package/dist/configs/perfectionist.d.cts +0 -20
- package/dist/configs/perfectionist.d.ts +0 -20
- package/dist/configs/perfectionist.mjs +0 -6
- package/dist/configs/react.cjs +0 -379
- package/dist/configs/react.d.cts +0 -11
- package/dist/configs/react.d.ts +0 -11
- package/dist/configs/react.mjs +0 -8
- package/dist/configs/solid.cjs +0 -360
- package/dist/configs/solid.d.cts +0 -11
- package/dist/configs/solid.d.ts +0 -11
- package/dist/configs/solid.mjs +0 -8
- 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/tailwindcss.cjs +0 -148
- package/dist/configs/tailwindcss.d.cts +0 -11
- package/dist/configs/tailwindcss.d.ts +0 -11
- package/dist/configs/tailwindcss.mjs +0 -8
- package/dist/configs/test.cjs +0 -206
- package/dist/configs/test.d.cts +0 -11
- package/dist/configs/test.d.ts +0 -11
- package/dist/configs/test.mjs +0 -9
- package/dist/configs/toml.cjs +0 -131
- package/dist/configs/toml.d.cts +0 -11
- package/dist/configs/toml.d.ts +0 -11
- package/dist/configs/toml.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/configs/unocss.cjs +0 -133
- package/dist/configs/unocss.d.cts +0 -11
- package/dist/configs/unocss.d.ts +0 -11
- package/dist/configs/unocss.mjs +0 -8
- package/dist/configs/vue.cjs +0 -293
- package/dist/configs/vue.d.cts +0 -11
- package/dist/configs/vue.d.ts +0 -11
- package/dist/configs/vue.mjs +0 -8
- package/dist/configs/yaml.cjs +0 -143
- package/dist/configs/yaml.d.cts +0 -11
- package/dist/configs/yaml.d.ts +0 -11
- package/dist/configs/yaml.mjs +0 -8
- package/dist/custom-rules/utils.cjs +0 -31
- package/dist/custom-rules/utils.d.cts +0 -6
- package/dist/custom-rules/utils.d.ts +0 -6
- package/dist/custom-rules/utils.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 -284
- package/dist/types-HqEzZfQU.d.cts +0 -668
- package/dist/types-HqEzZfQU.d.ts +0 -668
package/dist/configs/toml.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { l as TOMLOptions, k as toml } 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';
|
package/dist/configs/toml.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { l as TOMLOptions, k as toml } 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';
|
package/dist/configs/toml.mjs
DELETED
|
@@ -1,291 +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/typescript.ts
|
|
31
|
-
var typescript_exports = {};
|
|
32
|
-
__export(typescript_exports, {
|
|
33
|
-
typescript: () => typescript
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(typescript_exports);
|
|
36
|
-
var import_node_process2 = __toESM(require("process"), 1);
|
|
37
|
-
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
38
|
-
|
|
39
|
-
// src/globs.ts
|
|
40
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
41
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
42
|
-
var GLOB_TS = "**/*.?([cm])ts";
|
|
43
|
-
var GLOB_TSX = "**/*.?([cm])tsx";
|
|
44
|
-
var GLOB_MARKDOWN = "**/*.md";
|
|
45
|
-
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
46
|
-
var GLOB_TESTS = [
|
|
47
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
48
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
49
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
50
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
51
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
52
|
-
];
|
|
53
|
-
var GLOB_NEXTJS_ROUTES = [
|
|
54
|
-
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
55
|
-
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
56
|
-
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
57
|
-
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
58
|
-
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
59
|
-
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
60
|
-
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
61
|
-
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
62
|
-
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
// src/utils.ts
|
|
66
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
67
|
-
var import_local_pkg = require("local-pkg");
|
|
68
|
-
function renameRules(rules, from, to) {
|
|
69
|
-
return Object.fromEntries(
|
|
70
|
-
Object.entries(rules).map(([key, value]) => {
|
|
71
|
-
if (key.startsWith(from)) {
|
|
72
|
-
return [to + key.slice(from.length), value];
|
|
73
|
-
}
|
|
74
|
-
return [key, value];
|
|
75
|
-
})
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
function toArray(value) {
|
|
79
|
-
return Array.isArray(value) ? value : [value];
|
|
80
|
-
}
|
|
81
|
-
async function interop(m) {
|
|
82
|
-
const resolved = await m;
|
|
83
|
-
return resolved.default || resolved;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// src/configs/typescript.ts
|
|
87
|
-
async function typescript(options = {}) {
|
|
88
|
-
const {
|
|
89
|
-
exts = [],
|
|
90
|
-
overrides = {},
|
|
91
|
-
parserOptions = {}
|
|
92
|
-
} = options ?? {};
|
|
93
|
-
const files = options.files ?? [
|
|
94
|
-
GLOB_SRC,
|
|
95
|
-
...exts.map((ext) => `**/*.${ext}`)
|
|
96
|
-
];
|
|
97
|
-
const filesTypeAware = options.typeAwareFileS ?? [GLOB_TS, GLOB_TSX];
|
|
98
|
-
const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
|
|
99
|
-
const isTypeAware = !!tsconfigPath;
|
|
100
|
-
const typeAwareRules = {
|
|
101
|
-
"dot-notation": "off",
|
|
102
|
-
"no-implied-eval": "off",
|
|
103
|
-
"no-throw-literal": "off",
|
|
104
|
-
"ts/await-thenable": "error",
|
|
105
|
-
"ts/dot-notation": ["error", { allowKeywords: true }],
|
|
106
|
-
"ts/no-floating-promises": "error",
|
|
107
|
-
"ts/no-for-in-array": "error",
|
|
108
|
-
"ts/no-implied-eval": "error",
|
|
109
|
-
"ts/no-misused-promises": "error",
|
|
110
|
-
"ts/no-throw-literal": "error",
|
|
111
|
-
"ts/no-unnecessary-type-assertion": "error",
|
|
112
|
-
"ts/no-unsafe-argument": "error",
|
|
113
|
-
"ts/no-unsafe-assignment": "error",
|
|
114
|
-
"ts/no-unsafe-call": "error",
|
|
115
|
-
"ts/no-unsafe-member-access": "error",
|
|
116
|
-
"ts/no-unsafe-return": "error",
|
|
117
|
-
"ts/restrict-plus-operands": "error",
|
|
118
|
-
"ts/restrict-template-expressions": "error",
|
|
119
|
-
"ts/unbound-method": "error"
|
|
120
|
-
};
|
|
121
|
-
const [
|
|
122
|
-
pluginTs,
|
|
123
|
-
parserTs
|
|
124
|
-
] = await Promise.all([
|
|
125
|
-
interop(import("@typescript-eslint/eslint-plugin")),
|
|
126
|
-
interop(import("@typescript-eslint/parser"))
|
|
127
|
-
]);
|
|
128
|
-
function makeParser(typeAware, files2, ignores) {
|
|
129
|
-
return {
|
|
130
|
-
files: files2,
|
|
131
|
-
...ignores ? { ignores } : {},
|
|
132
|
-
name: `luxass:typescript:${typeAware ? "type-aware-parser" : "parser"}`,
|
|
133
|
-
languageOptions: {
|
|
134
|
-
parser: parserTs,
|
|
135
|
-
parserOptions: {
|
|
136
|
-
extraFileExtensions: exts.map((ext) => `.${ext}`),
|
|
137
|
-
sourceType: "module",
|
|
138
|
-
...typeAware ? {
|
|
139
|
-
project: tsconfigPath,
|
|
140
|
-
tsconfigRootDir: import_node_process2.default.cwd()
|
|
141
|
-
} : {},
|
|
142
|
-
...parserOptions
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
return [
|
|
148
|
-
{
|
|
149
|
-
// Install the plugins without globs, so they can be configured separately.
|
|
150
|
-
name: "luxass:typescript:setup",
|
|
151
|
-
plugins: {
|
|
152
|
-
antfu: import_eslint_plugin_antfu.default,
|
|
153
|
-
ts: pluginTs
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
...isTypeAware ? [
|
|
157
|
-
makeParser(true, filesTypeAware),
|
|
158
|
-
makeParser(false, files, filesTypeAware)
|
|
159
|
-
] : [makeParser(false, files)],
|
|
160
|
-
{
|
|
161
|
-
name: "luxass:typescript:rules",
|
|
162
|
-
files,
|
|
163
|
-
rules: {
|
|
164
|
-
...renameRules(
|
|
165
|
-
pluginTs.configs["eslint-recommended"].overrides[0].rules,
|
|
166
|
-
"@typescript-eslint/",
|
|
167
|
-
"ts/"
|
|
168
|
-
),
|
|
169
|
-
...renameRules(
|
|
170
|
-
pluginTs.configs.strict.rules,
|
|
171
|
-
"@typescript-eslint/",
|
|
172
|
-
"ts/"
|
|
173
|
-
),
|
|
174
|
-
"no-dupe-class-members": "off",
|
|
175
|
-
"no-invalid-this": "off",
|
|
176
|
-
"no-loss-of-precision": "off",
|
|
177
|
-
"no-redeclare": "off",
|
|
178
|
-
"no-use-before-define": "off",
|
|
179
|
-
"no-useless-constructor": "off",
|
|
180
|
-
"ts/ban-ts-comment": [
|
|
181
|
-
"error",
|
|
182
|
-
{ "ts-ignore": "allow-with-description" }
|
|
183
|
-
],
|
|
184
|
-
"ts/ban-types": ["error", {
|
|
185
|
-
extendDefaults: false,
|
|
186
|
-
types: {
|
|
187
|
-
BigInt: {
|
|
188
|
-
fixWith: "bigint",
|
|
189
|
-
message: "Use `bigint` instead."
|
|
190
|
-
},
|
|
191
|
-
Boolean: {
|
|
192
|
-
fixWith: "boolean",
|
|
193
|
-
message: "Use `boolean` instead."
|
|
194
|
-
},
|
|
195
|
-
Function: "Use a specific function type instead, like `() => void`.",
|
|
196
|
-
Number: {
|
|
197
|
-
fixWith: "number",
|
|
198
|
-
message: "Use `number` instead."
|
|
199
|
-
},
|
|
200
|
-
Object: {
|
|
201
|
-
fixWith: "Record<string, unknown>",
|
|
202
|
-
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"
|
|
203
|
-
},
|
|
204
|
-
String: {
|
|
205
|
-
fixWith: "string",
|
|
206
|
-
message: "Use `string` instead."
|
|
207
|
-
},
|
|
208
|
-
Symbol: {
|
|
209
|
-
fixWith: "symbol",
|
|
210
|
-
message: "Use `symbol` instead."
|
|
211
|
-
},
|
|
212
|
-
object: {
|
|
213
|
-
fixWith: "Record<string, unknown>",
|
|
214
|
-
message: "The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848"
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}],
|
|
218
|
-
"ts/consistent-type-definitions": ["error", "interface"],
|
|
219
|
-
"ts/consistent-type-imports": [
|
|
220
|
-
"error",
|
|
221
|
-
{ disallowTypeAnnotations: false, prefer: "type-imports" }
|
|
222
|
-
],
|
|
223
|
-
"ts/no-dupe-class-members": "error",
|
|
224
|
-
"ts/no-dynamic-delete": "off",
|
|
225
|
-
"ts/no-explicit-any": "off",
|
|
226
|
-
"ts/no-extraneous-class": "off",
|
|
227
|
-
"ts/no-import-type-side-effects": "error",
|
|
228
|
-
"ts/no-invalid-this": "error",
|
|
229
|
-
"ts/no-invalid-void-type": "off",
|
|
230
|
-
"ts/no-loss-of-precision": "error",
|
|
231
|
-
"ts/no-non-null-assertion": "off",
|
|
232
|
-
"ts/no-redeclare": "error",
|
|
233
|
-
"ts/no-require-imports": "error",
|
|
234
|
-
"ts/no-unused-vars": "off",
|
|
235
|
-
"ts/no-use-before-define": [
|
|
236
|
-
"error",
|
|
237
|
-
{ classes: false, functions: false, variables: true }
|
|
238
|
-
],
|
|
239
|
-
"ts/no-useless-constructor": "off",
|
|
240
|
-
"ts/prefer-ts-expect-error": "error",
|
|
241
|
-
"ts/triple-slash-reference": "off",
|
|
242
|
-
"ts/unified-signatures": "off",
|
|
243
|
-
...overrides
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
name: "luxass:typescript:rules-type-aware",
|
|
248
|
-
files: filesTypeAware,
|
|
249
|
-
rules: {
|
|
250
|
-
...tsconfigPath ? typeAwareRules : {},
|
|
251
|
-
...overrides
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
name: "luxass:typescript:dts-overrides",
|
|
256
|
-
files: ["**/*.d.ts"],
|
|
257
|
-
rules: {
|
|
258
|
-
"eslint-comments/no-unlimited-disable": "off",
|
|
259
|
-
"import/no-duplicates": "off",
|
|
260
|
-
"no-restricted-syntax": "off",
|
|
261
|
-
"unused-imports/no-unused-vars": "off"
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
name: "luxass:typescript:tests-overrides",
|
|
266
|
-
files: ["**/*.{test,spec}.ts?(x)"],
|
|
267
|
-
rules: {
|
|
268
|
-
"no-unused-expressions": "off"
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
name: "luxass:typescript:playground-overrides",
|
|
273
|
-
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
274
|
-
rules: {
|
|
275
|
-
"no-console": "off"
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
name: "luxass:typescript:javascript-overrides",
|
|
280
|
-
files: ["**/*.js", "**/*.cjs"],
|
|
281
|
-
rules: {
|
|
282
|
-
"ts/no-require-imports": "off",
|
|
283
|
-
"ts/no-var-requires": "off"
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
];
|
|
287
|
-
}
|
|
288
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
289
|
-
0 && (module.exports = {
|
|
290
|
-
typescript
|
|
291
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@typescript-eslint/parser';
|
|
2
|
-
export { T as TypeScriptOptions, t as typescript } from '../types-HqEzZfQU.cjs';
|
|
3
|
-
import 'eslint-config-flat-gitignore';
|
|
4
|
-
import '@antfu/eslint-define-config';
|
|
5
|
-
import '@eslint-types/jsdoc/types';
|
|
6
|
-
import '@eslint-types/typescript-eslint/types';
|
|
7
|
-
import '@eslint-types/unicorn/types';
|
|
8
|
-
import 'eslint-plugin-antfu';
|
|
9
|
-
import '@stylistic/eslint-plugin';
|
|
10
|
-
import 'eslint';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@typescript-eslint/parser';
|
|
2
|
-
export { T as TypeScriptOptions, t as typescript } from '../types-HqEzZfQU.js';
|
|
3
|
-
import 'eslint-config-flat-gitignore';
|
|
4
|
-
import '@antfu/eslint-define-config';
|
|
5
|
-
import '@eslint-types/jsdoc/types';
|
|
6
|
-
import '@eslint-types/typescript-eslint/types';
|
|
7
|
-
import '@eslint-types/unicorn/types';
|
|
8
|
-
import 'eslint-plugin-antfu';
|
|
9
|
-
import '@stylistic/eslint-plugin';
|
|
10
|
-
import 'eslint';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
package/dist/configs/unicorn.cjs
DELETED
|
@@ -1,91 +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/unicorn.ts
|
|
31
|
-
var unicorn_exports = {};
|
|
32
|
-
__export(unicorn_exports, {
|
|
33
|
-
unicorn: () => unicorn
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(unicorn_exports);
|
|
36
|
-
var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
|
|
37
|
-
function unicorn() {
|
|
38
|
-
return [
|
|
39
|
-
{
|
|
40
|
-
name: "luxass:unicorn",
|
|
41
|
-
plugins: {
|
|
42
|
-
unicorn: import_eslint_plugin_unicorn.default
|
|
43
|
-
},
|
|
44
|
-
rules: {
|
|
45
|
-
// Pass error message when throwing errors
|
|
46
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
|
|
47
|
-
"unicorn/error-message": "error",
|
|
48
|
-
// Uppercase regex escapes
|
|
49
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md
|
|
50
|
-
"unicorn/escape-case": "error",
|
|
51
|
-
// Array.isArray instead of instanceof
|
|
52
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-array.md
|
|
53
|
-
"unicorn/no-instanceof-array": "error",
|
|
54
|
-
// Ban `new Array` as `Array` constructor's params are ambiguous
|
|
55
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md
|
|
56
|
-
"unicorn/no-new-array": "error",
|
|
57
|
-
// Prevent deprecated `new Buffer()`
|
|
58
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md
|
|
59
|
-
"unicorn/no-new-buffer": "error",
|
|
60
|
-
// Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error')
|
|
61
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md
|
|
62
|
-
"unicorn/number-literal-case": "error",
|
|
63
|
-
// textContent instead of innerText
|
|
64
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md
|
|
65
|
-
"unicorn/prefer-dom-node-text-content": "error",
|
|
66
|
-
// includes over indexOf when checking for existence
|
|
67
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md
|
|
68
|
-
"unicorn/prefer-includes": "error",
|
|
69
|
-
// Prefer using the node: protocol
|
|
70
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
|
|
71
|
-
"unicorn/prefer-node-protocol": "error",
|
|
72
|
-
// Prefer using number properties like `Number.isNaN` rather than `isNaN`
|
|
73
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md
|
|
74
|
-
"unicorn/prefer-number-properties": "error",
|
|
75
|
-
// String methods startsWith/endsWith instead of more complicated stuff
|
|
76
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md
|
|
77
|
-
"unicorn/prefer-string-starts-ends-with": "error",
|
|
78
|
-
// Enforce throwing type error when throwing error while checking typeof
|
|
79
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
|
|
80
|
-
"unicorn/prefer-type-error": "error",
|
|
81
|
-
// Use new when throwing error
|
|
82
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md
|
|
83
|
-
"unicorn/throw-new-error": "error"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
];
|
|
87
|
-
}
|
|
88
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
-
0 && (module.exports = {
|
|
90
|
-
unicorn
|
|
91
|
-
});
|
|
@@ -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 unicorn(): FlatConfigItem[];
|
|
14
|
-
|
|
15
|
-
export { unicorn };
|
|
@@ -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 unicorn(): FlatConfigItem[];
|
|
14
|
-
|
|
15
|
-
export { unicorn };
|
package/dist/configs/unicorn.mjs
DELETED
package/dist/configs/unocss.cjs
DELETED
|
@@ -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/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/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';
|
package/dist/configs/unocss.d.ts
DELETED
|
@@ -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';
|