@luxass/eslint-config 4.3.0 → 4.3.2
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/index.cjs +23 -47
- package/dist/index.d.cts +6605 -3630
- package/dist/index.d.ts +6605 -3630
- package/dist/index.js +24 -54
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __export = (target, all) => {
|
|
3
|
-
for (var name in all)
|
|
4
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
1
|
// src/factory.ts
|
|
8
2
|
import process3 from "node:process";
|
|
9
3
|
import { existsSync } from "node:fs";
|
|
10
4
|
import { isPackageExists as isPackageExists4 } from "local-pkg";
|
|
11
|
-
import {
|
|
5
|
+
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
12
6
|
|
|
13
7
|
// src/configs/comments.ts
|
|
14
8
|
import eslintCommentsPlugin from "@eslint-community/eslint-plugin-eslint-comments";
|
|
@@ -206,7 +200,7 @@ function node() {
|
|
|
206
200
|
function sortPackageJson() {
|
|
207
201
|
return [
|
|
208
202
|
{
|
|
209
|
-
name: "luxass:sort
|
|
203
|
+
name: "luxass:sort:package-json",
|
|
210
204
|
files: ["**/package.json"],
|
|
211
205
|
rules: {
|
|
212
206
|
"jsonc/sort-array-values": [
|
|
@@ -306,7 +300,7 @@ function sortPackageJson() {
|
|
|
306
300
|
function sortTsconfig() {
|
|
307
301
|
return [
|
|
308
302
|
{
|
|
309
|
-
name: "luxass:sort
|
|
303
|
+
name: "luxass:sort:tsconfig",
|
|
310
304
|
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
311
305
|
rules: {
|
|
312
306
|
"jsonc/sort-keys": [
|
|
@@ -460,7 +454,7 @@ async function imports(options = {}) {
|
|
|
460
454
|
}
|
|
461
455
|
},
|
|
462
456
|
{
|
|
463
|
-
name: "luxass:imports
|
|
457
|
+
name: "luxass:disables:imports-bin",
|
|
464
458
|
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
465
459
|
rules: {
|
|
466
460
|
"antfu/no-import-dist": "off",
|
|
@@ -715,15 +709,12 @@ async function javascript(options = {}) {
|
|
|
715
709
|
}
|
|
716
710
|
},
|
|
717
711
|
{
|
|
718
|
-
name: "luxass:
|
|
719
|
-
files: [
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
{
|
|
725
|
-
name: "luxass:playground-overrides",
|
|
726
|
-
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
712
|
+
name: "luxass:disables:cli",
|
|
713
|
+
files: [
|
|
714
|
+
`scripts/${GLOB_SRC}`,
|
|
715
|
+
`cli.${GLOB_SRC_EXT}`,
|
|
716
|
+
`**/playground.${GLOB_SRC_EXT}`
|
|
717
|
+
],
|
|
727
718
|
rules: {
|
|
728
719
|
"no-console": "off"
|
|
729
720
|
}
|
|
@@ -921,27 +912,6 @@ async function jsonc(options = {}) {
|
|
|
921
912
|
];
|
|
922
913
|
}
|
|
923
914
|
|
|
924
|
-
// node_modules/.pnpm/eslint-parser-plain@0.1.0/node_modules/eslint-parser-plain/dist/index.mjs
|
|
925
|
-
var dist_exports = {};
|
|
926
|
-
__export(dist_exports, {
|
|
927
|
-
parseForESLint: () => parseForESLint
|
|
928
|
-
});
|
|
929
|
-
var parseForESLint = (code) => ({
|
|
930
|
-
ast: {
|
|
931
|
-
type: "Program",
|
|
932
|
-
loc: { start: 0, end: code.length },
|
|
933
|
-
range: [0, code.length],
|
|
934
|
-
body: [],
|
|
935
|
-
comments: [],
|
|
936
|
-
tokens: []
|
|
937
|
-
},
|
|
938
|
-
services: { isPlain: true },
|
|
939
|
-
scopeManager: null,
|
|
940
|
-
visitorKeys: {
|
|
941
|
-
Program: []
|
|
942
|
-
}
|
|
943
|
-
});
|
|
944
|
-
|
|
945
915
|
// src/configs/markdown.ts
|
|
946
916
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
947
917
|
async function markdown(options = {}) {
|
|
@@ -974,7 +944,7 @@ async function markdown(options = {}) {
|
|
|
974
944
|
name: "luxass:markdown:parser",
|
|
975
945
|
files,
|
|
976
946
|
languageOptions: {
|
|
977
|
-
parser:
|
|
947
|
+
parser: parserPlain
|
|
978
948
|
}
|
|
979
949
|
},
|
|
980
950
|
{
|
|
@@ -1255,7 +1225,7 @@ async function typescript(options = {}) {
|
|
|
1255
1225
|
}
|
|
1256
1226
|
},
|
|
1257
1227
|
{
|
|
1258
|
-
name: "luxass:typescript:dts
|
|
1228
|
+
name: "luxass:typescript:disables:dts",
|
|
1259
1229
|
files: ["**/*.d.ts"],
|
|
1260
1230
|
rules: {
|
|
1261
1231
|
"eslint-comments/no-unlimited-disable": "off",
|
|
@@ -1265,21 +1235,21 @@ async function typescript(options = {}) {
|
|
|
1265
1235
|
}
|
|
1266
1236
|
},
|
|
1267
1237
|
{
|
|
1268
|
-
name: "luxass:typescript:tests
|
|
1238
|
+
name: "luxass:typescript:disables:tests",
|
|
1269
1239
|
files: ["**/*.{test,spec}.ts?(x)"],
|
|
1270
1240
|
rules: {
|
|
1271
1241
|
"no-unused-expressions": "off"
|
|
1272
1242
|
}
|
|
1273
1243
|
},
|
|
1274
1244
|
{
|
|
1275
|
-
name: "luxass:typescript:playground
|
|
1245
|
+
name: "luxass:typescript:disables:playground",
|
|
1276
1246
|
files: [`**/playground.${GLOB_SRC_EXT}`],
|
|
1277
1247
|
rules: {
|
|
1278
1248
|
"no-console": "off"
|
|
1279
1249
|
}
|
|
1280
1250
|
},
|
|
1281
1251
|
{
|
|
1282
|
-
name: "luxass:typescript:javascript
|
|
1252
|
+
name: "luxass:typescript:disables:javascript",
|
|
1283
1253
|
files: ["**/*.js", "**/*.cjs"],
|
|
1284
1254
|
rules: {
|
|
1285
1255
|
"ts/no-require-imports": "off",
|
|
@@ -2179,7 +2149,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2179
2149
|
const pluginFormat = await interop(import("eslint-plugin-format"));
|
|
2180
2150
|
const configs = [
|
|
2181
2151
|
{
|
|
2182
|
-
name: "luxass:
|
|
2152
|
+
name: "luxass:formatter:setup",
|
|
2183
2153
|
plugins: {
|
|
2184
2154
|
format: pluginFormat
|
|
2185
2155
|
}
|
|
@@ -2191,7 +2161,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2191
2161
|
name: "luxass:formatter:css",
|
|
2192
2162
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
2193
2163
|
languageOptions: {
|
|
2194
|
-
parser:
|
|
2164
|
+
parser: parserPlain
|
|
2195
2165
|
},
|
|
2196
2166
|
rules: {
|
|
2197
2167
|
"format/prettier": [
|
|
@@ -2207,7 +2177,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2207
2177
|
name: "luxass:formatter:scss",
|
|
2208
2178
|
files: [GLOB_SCSS],
|
|
2209
2179
|
languageOptions: {
|
|
2210
|
-
parser:
|
|
2180
|
+
parser: parserPlain
|
|
2211
2181
|
},
|
|
2212
2182
|
rules: {
|
|
2213
2183
|
"format/prettier": [
|
|
@@ -2223,7 +2193,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2223
2193
|
name: "luxass:formatter:less",
|
|
2224
2194
|
files: [GLOB_LESS],
|
|
2225
2195
|
languageOptions: {
|
|
2226
|
-
parser:
|
|
2196
|
+
parser: parserPlain
|
|
2227
2197
|
},
|
|
2228
2198
|
rules: {
|
|
2229
2199
|
"format/prettier": [
|
|
@@ -2242,7 +2212,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2242
2212
|
name: "luxass:formatter:html",
|
|
2243
2213
|
files: ["**/*.html"],
|
|
2244
2214
|
languageOptions: {
|
|
2245
|
-
parser:
|
|
2215
|
+
parser: parserPlain
|
|
2246
2216
|
},
|
|
2247
2217
|
rules: {
|
|
2248
2218
|
"format/prettier": [
|
|
@@ -2261,7 +2231,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2261
2231
|
name: "luxass:formatter:markdown",
|
|
2262
2232
|
files: [GLOB_MARKDOWN],
|
|
2263
2233
|
languageOptions: {
|
|
2264
|
-
parser:
|
|
2234
|
+
parser: parserPlain
|
|
2265
2235
|
},
|
|
2266
2236
|
rules: {
|
|
2267
2237
|
[`format/${formater}`]: [
|
|
@@ -2284,7 +2254,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2284
2254
|
name: "luxass:formatter:astro",
|
|
2285
2255
|
files: [GLOB_ASTRO],
|
|
2286
2256
|
languageOptions: {
|
|
2287
|
-
parser:
|
|
2257
|
+
parser: parserPlain
|
|
2288
2258
|
},
|
|
2289
2259
|
rules: {
|
|
2290
2260
|
"format/prettier": [
|
|
@@ -2305,7 +2275,7 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
2305
2275
|
name: "luxass:formatter:graphql",
|
|
2306
2276
|
files: [GLOB_GRAPHQL],
|
|
2307
2277
|
languageOptions: {
|
|
2308
|
-
parser:
|
|
2278
|
+
parser: parserPlain
|
|
2309
2279
|
},
|
|
2310
2280
|
rules: {
|
|
2311
2281
|
"format/prettier": [
|
|
@@ -2646,7 +2616,7 @@ function luxass(options = {}, ...userConfigs) {
|
|
|
2646
2616
|
if (Object.keys(fusedConfig).length) {
|
|
2647
2617
|
configs.push([fusedConfig]);
|
|
2648
2618
|
}
|
|
2649
|
-
let pipeline = new
|
|
2619
|
+
let pipeline = new FlatConfigComposer();
|
|
2650
2620
|
pipeline = pipeline.append(
|
|
2651
2621
|
...configs,
|
|
2652
2622
|
...userConfigs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"description": "ESLint config for @luxass",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
"@typescript-eslint/eslint-plugin": "^7.4.0",
|
|
103
103
|
"@typescript-eslint/parser": "^7.4.0",
|
|
104
104
|
"eslint-config-flat-gitignore": "^0.1.3",
|
|
105
|
-
"eslint-flat-config-utils": "^0.
|
|
105
|
+
"eslint-flat-config-utils": "^0.2.0",
|
|
106
106
|
"eslint-merge-processors": "^0.1.0",
|
|
107
107
|
"eslint-plugin-antfu": "^2.1.2",
|
|
108
|
-
"eslint-plugin-import-x": "^0.
|
|
108
|
+
"eslint-plugin-import-x": "^0.5.0",
|
|
109
109
|
"eslint-plugin-jsdoc": "^48.2.2",
|
|
110
110
|
"eslint-plugin-jsonc": "^2.14.1",
|
|
111
111
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"eslint-plugin-toml": "^0.10.0",
|
|
116
116
|
"eslint-plugin-unicorn": "^51.0.1",
|
|
117
117
|
"eslint-plugin-unused-imports": "^3.1.0",
|
|
118
|
-
"eslint-plugin-vitest": "^0.4.
|
|
118
|
+
"eslint-plugin-vitest": "^0.4.1",
|
|
119
119
|
"eslint-plugin-vue": "^9.24.0",
|
|
120
120
|
"eslint-plugin-yml": "^1.13.2",
|
|
121
121
|
"eslint-processor-vue-blocks": "^0.1.1",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"@types/estree": "^1.0.5",
|
|
136
136
|
"@types/node": "^18.17.19",
|
|
137
137
|
"@typescript-eslint/rule-tester": "^7.4.0",
|
|
138
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
138
|
+
"@unocss/eslint-plugin": "^0.58.8",
|
|
139
139
|
"astro-eslint-parser": "^0.16.3",
|
|
140
140
|
"eslint": "9.0.0-rc.0",
|
|
141
141
|
"eslint-plugin-astro": "^0.33.1",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"eslint-plugin-react-refresh": "^0.4.6",
|
|
146
146
|
"eslint-plugin-solid": "^0.13.2",
|
|
147
147
|
"eslint-plugin-tailwindcss": "^3.15.1",
|
|
148
|
-
"eslint-typegen": "^0.
|
|
148
|
+
"eslint-typegen": "^0.2.0",
|
|
149
149
|
"jiti": "^1.21.0",
|
|
150
150
|
"lint-staged": "^15.2.2",
|
|
151
151
|
"prettier-plugin-astro": "^0.13.0",
|