@ivanmaxlogiudice/eslint-config 1.0.20 → 1.0.21
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 +1 -1
- package/dist/cli.cjs +8 -8
- package/dist/cli.js +8 -8
- package/dist/index.cjs +27 -12
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +27 -12
- package/package.json +17 -17
package/README.md
CHANGED
package/dist/cli.cjs
CHANGED
|
@@ -35,17 +35,17 @@ var import_picocolors4 = __toESM(require("picocolors"), 1);
|
|
|
35
35
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
36
36
|
|
|
37
37
|
// package.json
|
|
38
|
-
var version = "1.0.
|
|
38
|
+
var version = "1.0.21";
|
|
39
39
|
var devDependencies = {
|
|
40
|
-
"@stylistic/eslint-plugin-migrate": "^1.5.
|
|
40
|
+
"@stylistic/eslint-plugin-migrate": "^1.5.4",
|
|
41
41
|
"@types/eslint": "^8.56.2",
|
|
42
42
|
"@types/fs-extra": "^11.0.4",
|
|
43
|
-
"@types/node": "^20.11.
|
|
43
|
+
"@types/node": "^20.11.8",
|
|
44
44
|
"@types/prompts": "^2.4.9",
|
|
45
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
46
|
-
bumpp: "^9.
|
|
45
|
+
"@unocss/eslint-plugin": "^0.58.4",
|
|
46
|
+
bumpp: "^9.3.0",
|
|
47
47
|
eslint: "^8.56.0",
|
|
48
|
-
"eslint-flat-config-viewer": "^0.1.
|
|
48
|
+
"eslint-flat-config-viewer": "^0.1.11",
|
|
49
49
|
"eslint-plugin-format": "^0.1.0",
|
|
50
50
|
execa: "^8.0.1",
|
|
51
51
|
"fast-glob": "^3.3.2",
|
|
@@ -54,8 +54,8 @@ var devDependencies = {
|
|
|
54
54
|
"simple-git-hooks": "^2.9.0",
|
|
55
55
|
tsup: "^8.0.1",
|
|
56
56
|
typescript: "^5.3.3",
|
|
57
|
-
vitest: "^1.2.
|
|
58
|
-
vue: "^3.4.
|
|
57
|
+
vitest: "^1.2.2",
|
|
58
|
+
vue: "^3.4.15"
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
// src/cli/constants.ts
|
package/dist/cli.js
CHANGED
|
@@ -6,17 +6,17 @@ import c4 from "picocolors";
|
|
|
6
6
|
import c from "picocolors";
|
|
7
7
|
|
|
8
8
|
// package.json
|
|
9
|
-
var version = "1.0.
|
|
9
|
+
var version = "1.0.21";
|
|
10
10
|
var devDependencies = {
|
|
11
|
-
"@stylistic/eslint-plugin-migrate": "^1.5.
|
|
11
|
+
"@stylistic/eslint-plugin-migrate": "^1.5.4",
|
|
12
12
|
"@types/eslint": "^8.56.2",
|
|
13
13
|
"@types/fs-extra": "^11.0.4",
|
|
14
|
-
"@types/node": "^20.11.
|
|
14
|
+
"@types/node": "^20.11.8",
|
|
15
15
|
"@types/prompts": "^2.4.9",
|
|
16
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
17
|
-
bumpp: "^9.
|
|
16
|
+
"@unocss/eslint-plugin": "^0.58.4",
|
|
17
|
+
bumpp: "^9.3.0",
|
|
18
18
|
eslint: "^8.56.0",
|
|
19
|
-
"eslint-flat-config-viewer": "^0.1.
|
|
19
|
+
"eslint-flat-config-viewer": "^0.1.11",
|
|
20
20
|
"eslint-plugin-format": "^0.1.0",
|
|
21
21
|
execa: "^8.0.1",
|
|
22
22
|
"fast-glob": "^3.3.2",
|
|
@@ -25,8 +25,8 @@ var devDependencies = {
|
|
|
25
25
|
"simple-git-hooks": "^2.9.0",
|
|
26
26
|
tsup: "^8.0.1",
|
|
27
27
|
typescript: "^5.3.3",
|
|
28
|
-
vitest: "^1.2.
|
|
29
|
-
vue: "^3.4.
|
|
28
|
+
vitest: "^1.2.2",
|
|
29
|
+
vue: "^3.4.15"
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// src/cli/constants.ts
|
package/dist/index.cjs
CHANGED
|
@@ -1342,6 +1342,8 @@ async function typescript(options = {}) {
|
|
|
1342
1342
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
1343
1343
|
];
|
|
1344
1344
|
const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
|
|
1345
|
+
const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
|
|
1346
|
+
const isTypeAware = !!tsconfigPath;
|
|
1345
1347
|
const typeAwareRules = {
|
|
1346
1348
|
"dot-notation": "off",
|
|
1347
1349
|
"no-implied-eval": "off",
|
|
@@ -1363,7 +1365,6 @@ async function typescript(options = {}) {
|
|
|
1363
1365
|
"ts/restrict-template-expressions": "error",
|
|
1364
1366
|
"ts/unbound-method": "error"
|
|
1365
1367
|
};
|
|
1366
|
-
const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
|
|
1367
1368
|
const [
|
|
1368
1369
|
pluginTs,
|
|
1369
1370
|
parserTs
|
|
@@ -1371,28 +1372,41 @@ async function typescript(options = {}) {
|
|
|
1371
1372
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
1372
1373
|
interopDefault(import("@typescript-eslint/parser"))
|
|
1373
1374
|
]);
|
|
1374
|
-
|
|
1375
|
-
{
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
import: pluginImport,
|
|
1379
|
-
ts: pluginTs
|
|
1380
|
-
}
|
|
1381
|
-
},
|
|
1382
|
-
{
|
|
1383
|
-
files,
|
|
1375
|
+
function makeParser(typeAware, files2, ignores2) {
|
|
1376
|
+
return {
|
|
1377
|
+
files: files2,
|
|
1378
|
+
...ignores2 ? { ignores: ignores2 } : {},
|
|
1384
1379
|
languageOptions: {
|
|
1385
1380
|
parser: parserTs,
|
|
1386
1381
|
parserOptions: {
|
|
1387
1382
|
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
1388
1383
|
sourceType: "module",
|
|
1389
|
-
...
|
|
1384
|
+
...typeAware ? {
|
|
1390
1385
|
project: tsconfigPath,
|
|
1391
1386
|
tsconfigRootDir: import_node_process2.default.cwd()
|
|
1392
1387
|
} : {},
|
|
1393
1388
|
...parserOptions
|
|
1394
1389
|
}
|
|
1395
1390
|
},
|
|
1391
|
+
name: `config:typescript:${typeAware ? "type-aware-parser" : "parser"}`
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
return [
|
|
1395
|
+
// Install the plugins without globs, so they can be configured separately.
|
|
1396
|
+
{
|
|
1397
|
+
name: "config:typescript:setup",
|
|
1398
|
+
plugins: {
|
|
1399
|
+
import: pluginImport,
|
|
1400
|
+
ts: pluginTs
|
|
1401
|
+
}
|
|
1402
|
+
},
|
|
1403
|
+
// assign type-aware parser for type-aware files and type-unaware parser for the rest
|
|
1404
|
+
...isTypeAware ? [
|
|
1405
|
+
makeParser(true, filesTypeAware),
|
|
1406
|
+
makeParser(false, files, filesTypeAware)
|
|
1407
|
+
] : [makeParser(false, files)],
|
|
1408
|
+
{
|
|
1409
|
+
files,
|
|
1396
1410
|
name: "config:typescript:rules",
|
|
1397
1411
|
rules: {
|
|
1398
1412
|
...renameRules(
|
|
@@ -1817,6 +1831,7 @@ async function yaml(options = {}) {
|
|
|
1817
1831
|
|
|
1818
1832
|
// src/factory.ts
|
|
1819
1833
|
var flatConfigProps = [
|
|
1834
|
+
"name",
|
|
1820
1835
|
"files",
|
|
1821
1836
|
"ignores",
|
|
1822
1837
|
"languageOptions",
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1251,6 +1251,8 @@ async function typescript(options = {}) {
|
|
|
1251
1251
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
1252
1252
|
];
|
|
1253
1253
|
const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
|
|
1254
|
+
const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
|
|
1255
|
+
const isTypeAware = !!tsconfigPath;
|
|
1254
1256
|
const typeAwareRules = {
|
|
1255
1257
|
"dot-notation": "off",
|
|
1256
1258
|
"no-implied-eval": "off",
|
|
@@ -1272,7 +1274,6 @@ async function typescript(options = {}) {
|
|
|
1272
1274
|
"ts/restrict-template-expressions": "error",
|
|
1273
1275
|
"ts/unbound-method": "error"
|
|
1274
1276
|
};
|
|
1275
|
-
const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
|
|
1276
1277
|
const [
|
|
1277
1278
|
pluginTs,
|
|
1278
1279
|
parserTs
|
|
@@ -1280,28 +1281,41 @@ async function typescript(options = {}) {
|
|
|
1280
1281
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
1281
1282
|
interopDefault(import("@typescript-eslint/parser"))
|
|
1282
1283
|
]);
|
|
1283
|
-
|
|
1284
|
-
{
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
import: pluginImport,
|
|
1288
|
-
ts: pluginTs
|
|
1289
|
-
}
|
|
1290
|
-
},
|
|
1291
|
-
{
|
|
1292
|
-
files,
|
|
1284
|
+
function makeParser(typeAware, files2, ignores2) {
|
|
1285
|
+
return {
|
|
1286
|
+
files: files2,
|
|
1287
|
+
...ignores2 ? { ignores: ignores2 } : {},
|
|
1293
1288
|
languageOptions: {
|
|
1294
1289
|
parser: parserTs,
|
|
1295
1290
|
parserOptions: {
|
|
1296
1291
|
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
1297
1292
|
sourceType: "module",
|
|
1298
|
-
...
|
|
1293
|
+
...typeAware ? {
|
|
1299
1294
|
project: tsconfigPath,
|
|
1300
1295
|
tsconfigRootDir: process2.cwd()
|
|
1301
1296
|
} : {},
|
|
1302
1297
|
...parserOptions
|
|
1303
1298
|
}
|
|
1304
1299
|
},
|
|
1300
|
+
name: `config:typescript:${typeAware ? "type-aware-parser" : "parser"}`
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
return [
|
|
1304
|
+
// Install the plugins without globs, so they can be configured separately.
|
|
1305
|
+
{
|
|
1306
|
+
name: "config:typescript:setup",
|
|
1307
|
+
plugins: {
|
|
1308
|
+
import: pluginImport,
|
|
1309
|
+
ts: pluginTs
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
// assign type-aware parser for type-aware files and type-unaware parser for the rest
|
|
1313
|
+
...isTypeAware ? [
|
|
1314
|
+
makeParser(true, filesTypeAware),
|
|
1315
|
+
makeParser(false, files, filesTypeAware)
|
|
1316
|
+
] : [makeParser(false, files)],
|
|
1317
|
+
{
|
|
1318
|
+
files,
|
|
1305
1319
|
name: "config:typescript:rules",
|
|
1306
1320
|
rules: {
|
|
1307
1321
|
...renameRules(
|
|
@@ -1726,6 +1740,7 @@ async function yaml(options = {}) {
|
|
|
1726
1740
|
|
|
1727
1741
|
// src/factory.ts
|
|
1728
1742
|
var flatConfigProps = [
|
|
1743
|
+
"name",
|
|
1729
1744
|
"files",
|
|
1730
1745
|
"ignores",
|
|
1731
1746
|
"languageOptions",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ivanmaxlogiudice/eslint-config",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"packageManager": "pnpm@8.
|
|
3
|
+
"version": "1.0.21",
|
|
4
|
+
"packageManager": "pnpm@8.15.0",
|
|
5
5
|
"description": "Personal ESLint config",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"@eslint-types/jsdoc": "48.0.2",
|
|
52
52
|
"@eslint-types/typescript-eslint": "^6.18.1",
|
|
53
53
|
"@eslint-types/unicorn": "^50.0.1",
|
|
54
|
-
"@stylistic/eslint-plugin": "^1.5.
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
56
|
-
"@typescript-eslint/parser": "^6.
|
|
54
|
+
"@stylistic/eslint-plugin": "^1.5.4",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
|
56
|
+
"@typescript-eslint/parser": "^6.19.1",
|
|
57
57
|
"cac": "^6.7.14",
|
|
58
58
|
"detect-indent": "^7.0.1",
|
|
59
59
|
"eslint-config-flat-gitignore": "^0.1.2",
|
|
60
60
|
"eslint-merge-processors": "^0.1.0",
|
|
61
|
-
"eslint-plugin-antfu": "^2.1.
|
|
61
|
+
"eslint-plugin-antfu": "^2.1.2",
|
|
62
62
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
63
63
|
"eslint-plugin-i": "^2.29.1",
|
|
64
|
-
"eslint-plugin-jsdoc": "^48.0.
|
|
65
|
-
"eslint-plugin-jsonc": "^2.
|
|
64
|
+
"eslint-plugin-jsdoc": "^48.0.4",
|
|
65
|
+
"eslint-plugin-jsonc": "^2.13.0",
|
|
66
66
|
"eslint-plugin-markdown": "^3.0.1",
|
|
67
67
|
"eslint-plugin-n": "^16.6.2",
|
|
68
68
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
73
73
|
"eslint-plugin-vitest": "^0.3.20",
|
|
74
74
|
"eslint-plugin-vue": "^9.20.1",
|
|
75
|
-
"eslint-plugin-yml": "^1.
|
|
75
|
+
"eslint-plugin-yml": "^1.12.2",
|
|
76
76
|
"eslint-processor-vue-blocks": "^0.1.1",
|
|
77
77
|
"globals": "^13.24.0",
|
|
78
78
|
"jsonc-eslint-parser": "^2.4.0",
|
|
@@ -80,19 +80,19 @@
|
|
|
80
80
|
"parse-gitignore": "^2.0.0",
|
|
81
81
|
"picocolors": "^1.0.0",
|
|
82
82
|
"prompts": "^2.4.2",
|
|
83
|
-
"vue-eslint-parser": "^9.4.
|
|
83
|
+
"vue-eslint-parser": "^9.4.2",
|
|
84
84
|
"yaml-eslint-parser": "^1.2.2"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@stylistic/eslint-plugin-migrate": "^1.5.
|
|
87
|
+
"@stylistic/eslint-plugin-migrate": "^1.5.4",
|
|
88
88
|
"@types/eslint": "^8.56.2",
|
|
89
89
|
"@types/fs-extra": "^11.0.4",
|
|
90
|
-
"@types/node": "^20.11.
|
|
90
|
+
"@types/node": "^20.11.8",
|
|
91
91
|
"@types/prompts": "^2.4.9",
|
|
92
|
-
"@unocss/eslint-plugin": "^0.58.
|
|
93
|
-
"bumpp": "^9.
|
|
92
|
+
"@unocss/eslint-plugin": "^0.58.4",
|
|
93
|
+
"bumpp": "^9.3.0",
|
|
94
94
|
"eslint": "^8.56.0",
|
|
95
|
-
"eslint-flat-config-viewer": "^0.1.
|
|
95
|
+
"eslint-flat-config-viewer": "^0.1.11",
|
|
96
96
|
"eslint-plugin-format": "^0.1.0",
|
|
97
97
|
"execa": "^8.0.1",
|
|
98
98
|
"fast-glob": "^3.3.2",
|
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
"simple-git-hooks": "^2.9.0",
|
|
102
102
|
"tsup": "^8.0.1",
|
|
103
103
|
"typescript": "^5.3.3",
|
|
104
|
-
"vitest": "^1.2.
|
|
105
|
-
"vue": "^3.4.
|
|
104
|
+
"vitest": "^1.2.2",
|
|
105
|
+
"vue": "^3.4.15"
|
|
106
106
|
},
|
|
107
107
|
"engines": {
|
|
108
108
|
"node": ">=18.12.0"
|