@ntnyq/eslint-config 7.0.0-beta.27 → 7.0.0-beta.29
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.d.mts +763 -500
- package/dist/index.mjs +51 -90
- package/package.json +20 -20
package/dist/index.mjs
CHANGED
|
@@ -41,7 +41,7 @@ import { createTypeScriptImportResolver } from "eslint-import-resolver-typescrip
|
|
|
41
41
|
import globals from "globals";
|
|
42
42
|
import createGitIgnoreConfig from "eslint-config-flat-gitignore";
|
|
43
43
|
import jsConfig from "@eslint/js";
|
|
44
|
-
|
|
44
|
+
// src/globs.ts
|
|
45
45
|
/**
|
|
46
46
|
* @file globs constants
|
|
47
47
|
*/
|
|
@@ -166,8 +166,7 @@ const GLOB_EXCLUDE = [
|
|
|
166
166
|
"**/*.agents",
|
|
167
167
|
"**/.*/skills"
|
|
168
168
|
];
|
|
169
|
-
|
|
170
|
-
//#region src/utils/env.ts
|
|
169
|
+
// src/utils/env.ts
|
|
171
170
|
/**
|
|
172
171
|
* Check whether Pinia is available in the current project.
|
|
173
172
|
*/
|
|
@@ -204,8 +203,7 @@ const hasPrettier = () => isPackageExists("prettier");
|
|
|
204
203
|
* Check whether AutoImport is available in the current project.
|
|
205
204
|
*/
|
|
206
205
|
const hasAutoImport = () => isPackageExists("unplugin-auto-import");
|
|
207
|
-
|
|
208
|
-
//#region src/utils/resolveSubOptions.ts
|
|
206
|
+
// src/utils/resolveSubOptions.ts
|
|
209
207
|
/**
|
|
210
208
|
* Normalize a sub-option value to an object.
|
|
211
209
|
*
|
|
@@ -219,8 +217,7 @@ const hasAutoImport = () => isPackageExists("unplugin-auto-import");
|
|
|
219
217
|
function resolveSubOptions(options, key) {
|
|
220
218
|
return typeof options[key] === "boolean" ? {} : options[key] || {};
|
|
221
219
|
}
|
|
222
|
-
|
|
223
|
-
//#region src/utils/getOverrides.ts
|
|
220
|
+
// src/utils/getOverrides.ts
|
|
224
221
|
/**
|
|
225
222
|
* Read rule overrides from a config sub-option.
|
|
226
223
|
*
|
|
@@ -232,8 +229,7 @@ function getOverrides(options, key) {
|
|
|
232
229
|
const subOptions = resolveSubOptions(options, key);
|
|
233
230
|
return "overrides" in subOptions && subOptions.overrides ? subOptions.overrides : {};
|
|
234
231
|
}
|
|
235
|
-
|
|
236
|
-
//#region src/utils/isInGitHooksOrRunBySpecifyPackages.ts
|
|
232
|
+
// src/utils/isInGitHooksOrRunBySpecifyPackages.ts
|
|
237
233
|
const CHECKED_RUNNER_PACKAGES = [
|
|
238
234
|
"nano-staged",
|
|
239
235
|
"lint-staged",
|
|
@@ -246,8 +242,7 @@ const CHECKED_RUNNER_PACKAGES = [
|
|
|
246
242
|
function isInGitHooksOrRunBySpecifyPackages() {
|
|
247
243
|
return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || CHECKED_RUNNER_PACKAGES.some((packageName) => process.env.npm_lifecycle_script?.startsWith(packageName)));
|
|
248
244
|
}
|
|
249
|
-
|
|
250
|
-
//#region src/utils/ensurePackages.ts
|
|
245
|
+
// src/utils/ensurePackages.ts
|
|
251
246
|
/**
|
|
252
247
|
* @copyright {@link https://github.com/antfu/eslint-config}
|
|
253
248
|
*/
|
|
@@ -280,8 +275,7 @@ async function ensurePackages(packages) {
|
|
|
280
275
|
throw new Error(`Failed to install required packages: ${nonExistingPackages.join(", ")}`, { cause: error });
|
|
281
276
|
}
|
|
282
277
|
}
|
|
283
|
-
|
|
284
|
-
//#region src/utils/interopDefault.ts
|
|
278
|
+
// src/utils/interopDefault.ts
|
|
285
279
|
/**
|
|
286
280
|
* Interop default export from a module
|
|
287
281
|
* @param mod - The module
|
|
@@ -291,8 +285,7 @@ async function interopDefault(mod) {
|
|
|
291
285
|
const resolved = await mod;
|
|
292
286
|
return resolved.default || resolved;
|
|
293
287
|
}
|
|
294
|
-
|
|
295
|
-
//#region src/configs/vue.ts
|
|
288
|
+
// src/configs/vue.ts
|
|
296
289
|
const sharedRules = {
|
|
297
290
|
...pluginVue.configs.base.rules,
|
|
298
291
|
...pluginVue.configs.essential.rules,
|
|
@@ -541,6 +534,9 @@ const configVue = (options = {}) => {
|
|
|
541
534
|
multiline: 1,
|
|
542
535
|
singleline: 1
|
|
543
536
|
}],
|
|
537
|
+
"vue/no-content-outside-block": "error",
|
|
538
|
+
"vue/no-define-model-default": "error",
|
|
539
|
+
"vue/no-props-shadow": "error",
|
|
544
540
|
"vue/order-in-components": ["error", { order: [
|
|
545
541
|
"el",
|
|
546
542
|
"name",
|
|
@@ -644,9 +640,11 @@ const configVue = (options = {}) => {
|
|
|
644
640
|
plugins: { "vue-perfectionist": pluginVuePerfectionist },
|
|
645
641
|
settings: { "vue-perfectionist": { autoImport: enableAutoImport } },
|
|
646
642
|
rules: {
|
|
643
|
+
"vue-perfectionist/prefer-define-model": "warn",
|
|
647
644
|
"vue-perfectionist/callback-style": "error",
|
|
648
645
|
"vue-perfectionist/consistent-template-ref-name": "error",
|
|
649
646
|
"vue-perfectionist/define-macros-newline": "error",
|
|
647
|
+
"vue-perfectionist/no-complex-template-expression": "error",
|
|
650
648
|
"vue-perfectionist/no-complex-v-for-source": "error",
|
|
651
649
|
"vue-perfectionist/prefer-ref-pattern": "error",
|
|
652
650
|
"vue-perfectionist/prefer-simple-event-handler": ["error", {
|
|
@@ -654,6 +652,7 @@ const configVue = (options = {}) => {
|
|
|
654
652
|
allowInlineFunctions: false,
|
|
655
653
|
allowLogical: true
|
|
656
654
|
}],
|
|
655
|
+
"vue-perfectionist/prefer-watch-effect-alias": "error",
|
|
657
656
|
"vue-perfectionist/sort-script-setup": ["error", { groups: [
|
|
658
657
|
["interface", "type"],
|
|
659
658
|
"define-props",
|
|
@@ -680,8 +679,7 @@ const configVue = (options = {}) => {
|
|
|
680
679
|
});
|
|
681
680
|
return configs;
|
|
682
681
|
};
|
|
683
|
-
|
|
684
|
-
//#region src/configs/yml.ts
|
|
682
|
+
// src/configs/yml.ts
|
|
685
683
|
/**
|
|
686
684
|
* @see {@link https://github.com/ota-meshi/eslint-plugin-yml/blob/master/src/configs/base.ts}
|
|
687
685
|
*/
|
|
@@ -748,8 +746,7 @@ const configYml = (options = {}) => {
|
|
|
748
746
|
}
|
|
749
747
|
}];
|
|
750
748
|
};
|
|
751
|
-
|
|
752
|
-
//#region src/configs/html.ts
|
|
749
|
+
// src/configs/html.ts
|
|
753
750
|
/**
|
|
754
751
|
* Config for html files
|
|
755
752
|
*
|
|
@@ -788,8 +785,7 @@ const configHtml = async (options = {}) => {
|
|
|
788
785
|
}
|
|
789
786
|
}];
|
|
790
787
|
};
|
|
791
|
-
|
|
792
|
-
//#region src/configs/node.ts
|
|
788
|
+
// src/configs/node.ts
|
|
793
789
|
/**
|
|
794
790
|
* Config for common files
|
|
795
791
|
*
|
|
@@ -815,8 +811,7 @@ const configNode = (options = {}) => [{
|
|
|
815
811
|
...options.overrides
|
|
816
812
|
}
|
|
817
813
|
}];
|
|
818
|
-
|
|
819
|
-
//#region src/configs/pnpm.ts
|
|
814
|
+
// src/configs/pnpm.ts
|
|
820
815
|
/**
|
|
821
816
|
* Config for pnpm package manager
|
|
822
817
|
*
|
|
@@ -857,8 +852,7 @@ const configPnpm = async (options = {}) => {
|
|
|
857
852
|
});
|
|
858
853
|
return configs;
|
|
859
854
|
};
|
|
860
|
-
|
|
861
|
-
//#region src/configs/sort.ts
|
|
855
|
+
// src/configs/sort.ts
|
|
862
856
|
/**
|
|
863
857
|
* Config for sort keys and values
|
|
864
858
|
*
|
|
@@ -1252,8 +1246,7 @@ const configSort = (options = {}) => {
|
|
|
1252
1246
|
});
|
|
1253
1247
|
return configs;
|
|
1254
1248
|
};
|
|
1255
|
-
|
|
1256
|
-
//#region src/configs/svgo.ts
|
|
1249
|
+
// src/configs/svgo.ts
|
|
1257
1250
|
/**
|
|
1258
1251
|
* Config for svg files
|
|
1259
1252
|
*
|
|
@@ -1282,8 +1275,7 @@ const configSVGO = (options = {}) => {
|
|
|
1282
1275
|
}
|
|
1283
1276
|
}];
|
|
1284
1277
|
};
|
|
1285
|
-
|
|
1286
|
-
//#region src/configs/test.ts
|
|
1278
|
+
// src/configs/test.ts
|
|
1287
1279
|
/**
|
|
1288
1280
|
* Config for test files
|
|
1289
1281
|
*
|
|
@@ -1328,8 +1320,7 @@ const configTest = (options = {}) => {
|
|
|
1328
1320
|
});
|
|
1329
1321
|
return configs;
|
|
1330
1322
|
};
|
|
1331
|
-
|
|
1332
|
-
//#region src/configs/toml.ts
|
|
1323
|
+
// src/configs/toml.ts
|
|
1333
1324
|
/**
|
|
1334
1325
|
* Config for toml files
|
|
1335
1326
|
*
|
|
@@ -1369,8 +1360,7 @@ const configToml = (options = {}) => {
|
|
|
1369
1360
|
}
|
|
1370
1361
|
}];
|
|
1371
1362
|
};
|
|
1372
|
-
|
|
1373
|
-
//#region src/configs/antfu.ts
|
|
1363
|
+
// src/configs/antfu.ts
|
|
1374
1364
|
/**
|
|
1375
1365
|
* Config for common files
|
|
1376
1366
|
*
|
|
@@ -1390,8 +1380,7 @@ const configAntfu = (options = {}) => [{
|
|
|
1390
1380
|
...options.overrides
|
|
1391
1381
|
}
|
|
1392
1382
|
}];
|
|
1393
|
-
|
|
1394
|
-
//#region src/configs/astro.ts
|
|
1383
|
+
// src/configs/astro.ts
|
|
1395
1384
|
/**
|
|
1396
1385
|
* Config for astro files
|
|
1397
1386
|
*
|
|
@@ -1431,8 +1420,7 @@ const configAstro = async (options = {}) => {
|
|
|
1431
1420
|
}
|
|
1432
1421
|
}];
|
|
1433
1422
|
};
|
|
1434
|
-
|
|
1435
|
-
//#region src/configs/jsdoc.ts
|
|
1423
|
+
// src/configs/jsdoc.ts
|
|
1436
1424
|
const SPECIAL_CHAR = {
|
|
1437
1425
|
emptyString: "",
|
|
1438
1426
|
singleSpace: " "
|
|
@@ -1569,8 +1557,7 @@ const configJsdoc = (options = {}) => {
|
|
|
1569
1557
|
}
|
|
1570
1558
|
];
|
|
1571
1559
|
};
|
|
1572
|
-
|
|
1573
|
-
//#region src/configs/jsonc.ts
|
|
1560
|
+
// src/configs/jsonc.ts
|
|
1574
1561
|
/**
|
|
1575
1562
|
* @see {@link https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/lib/configs/base.ts}
|
|
1576
1563
|
*/
|
|
@@ -1664,8 +1651,7 @@ const configJsonc = (options = {}) => {
|
|
|
1664
1651
|
}
|
|
1665
1652
|
}];
|
|
1666
1653
|
};
|
|
1667
|
-
|
|
1668
|
-
//#region src/configs/ntnyq.ts
|
|
1654
|
+
// src/configs/ntnyq.ts
|
|
1669
1655
|
/**
|
|
1670
1656
|
* Config for common files
|
|
1671
1657
|
*
|
|
@@ -1701,8 +1687,7 @@ const configNtnyq = (options = {}) => [{
|
|
|
1701
1687
|
...options.overrides
|
|
1702
1688
|
}
|
|
1703
1689
|
}];
|
|
1704
|
-
|
|
1705
|
-
//#region src/configs/oxfmt.ts
|
|
1690
|
+
// src/configs/oxfmt.ts
|
|
1706
1691
|
/**
|
|
1707
1692
|
* Config for using oxfmt
|
|
1708
1693
|
*
|
|
@@ -1742,8 +1727,7 @@ const configOxfmt = (options = {}) => {
|
|
|
1742
1727
|
}
|
|
1743
1728
|
}];
|
|
1744
1729
|
};
|
|
1745
|
-
|
|
1746
|
-
//#region src/configs/pinia.ts
|
|
1730
|
+
// src/configs/pinia.ts
|
|
1747
1731
|
/**
|
|
1748
1732
|
* Config for pinia store
|
|
1749
1733
|
*
|
|
@@ -1773,8 +1757,7 @@ const configPinia = (options = {}) => {
|
|
|
1773
1757
|
}
|
|
1774
1758
|
}];
|
|
1775
1759
|
};
|
|
1776
|
-
|
|
1777
|
-
//#region src/configs/depend.ts
|
|
1760
|
+
// src/configs/depend.ts
|
|
1778
1761
|
/**
|
|
1779
1762
|
* Config for optimisations dependency
|
|
1780
1763
|
*
|
|
@@ -1813,8 +1796,7 @@ const configDepend = (options = {}) => {
|
|
|
1813
1796
|
});
|
|
1814
1797
|
return configs;
|
|
1815
1798
|
};
|
|
1816
|
-
|
|
1817
|
-
//#region src/configs/regexp.ts
|
|
1799
|
+
// src/configs/regexp.ts
|
|
1818
1800
|
/**
|
|
1819
1801
|
* @file config for plugin regexp
|
|
1820
1802
|
* @see {@link https://github.com/ota-meshi/eslint-plugin-regexp}
|
|
@@ -1842,8 +1824,7 @@ const configRegexp = (options = {}) => {
|
|
|
1842
1824
|
}
|
|
1843
1825
|
}];
|
|
1844
1826
|
};
|
|
1845
|
-
|
|
1846
|
-
//#region src/configs/svelte.ts
|
|
1827
|
+
// src/configs/svelte.ts
|
|
1847
1828
|
/**
|
|
1848
1829
|
* Config for svelte files
|
|
1849
1830
|
*
|
|
@@ -1929,8 +1910,7 @@ const configSvelte = async (options = {}) => {
|
|
|
1929
1910
|
}
|
|
1930
1911
|
}];
|
|
1931
1912
|
};
|
|
1932
|
-
|
|
1933
|
-
//#region src/configs/unocss.ts
|
|
1913
|
+
// src/configs/unocss.ts
|
|
1934
1914
|
/**
|
|
1935
1915
|
* Config for UnoCSS
|
|
1936
1916
|
*
|
|
@@ -1948,8 +1928,7 @@ const configUnoCSS = (options = {}) => [{
|
|
|
1948
1928
|
...options.overrides
|
|
1949
1929
|
}
|
|
1950
1930
|
}];
|
|
1951
|
-
|
|
1952
|
-
//#region src/commands/index.ts
|
|
1931
|
+
// src/commands/index.ts
|
|
1953
1932
|
const commands = [defineCommand({
|
|
1954
1933
|
name: "regexper",
|
|
1955
1934
|
match: /(\b|\s|^)(@regexper)(\s\S+)?(\b|\s|$)/,
|
|
@@ -1974,8 +1953,7 @@ const commands = [defineCommand({
|
|
|
1974
1953
|
});
|
|
1975
1954
|
}
|
|
1976
1955
|
})];
|
|
1977
|
-
|
|
1978
|
-
//#region src/configs/command.ts
|
|
1956
|
+
// src/configs/command.ts
|
|
1979
1957
|
/**
|
|
1980
1958
|
* Config for using comments as codemod
|
|
1981
1959
|
*
|
|
@@ -1995,8 +1973,7 @@ const configCommand = (options = {}) => [{
|
|
|
1995
1973
|
}),
|
|
1996
1974
|
name: "ntnyq/command"
|
|
1997
1975
|
}];
|
|
1998
|
-
|
|
1999
|
-
//#region src/configs/ignores.ts
|
|
1976
|
+
// src/configs/ignores.ts
|
|
2000
1977
|
/**
|
|
2001
1978
|
* Config for ignore files from linting
|
|
2002
1979
|
*
|
|
@@ -2014,8 +1991,7 @@ const configIgnores = (customIgnores = []) => {
|
|
|
2014
1991
|
ignores
|
|
2015
1992
|
}];
|
|
2016
1993
|
};
|
|
2017
|
-
|
|
2018
|
-
//#region src/configs/importX.ts
|
|
1994
|
+
// src/configs/importX.ts
|
|
2019
1995
|
/**
|
|
2020
1996
|
* Config for imports and exports
|
|
2021
1997
|
*
|
|
@@ -2062,8 +2038,7 @@ const configImportX = (options = {}) => {
|
|
|
2062
2038
|
}
|
|
2063
2039
|
}];
|
|
2064
2040
|
};
|
|
2065
|
-
|
|
2066
|
-
//#region src/configs/unicorn.ts
|
|
2041
|
+
// src/configs/unicorn.ts
|
|
2067
2042
|
/**
|
|
2068
2043
|
* Built-in presets of `eslint-plugin-unicorn`
|
|
2069
2044
|
*/
|
|
@@ -2342,8 +2317,7 @@ const configUnicorn = (options = {}) => {
|
|
|
2342
2317
|
}
|
|
2343
2318
|
}];
|
|
2344
2319
|
};
|
|
2345
|
-
|
|
2346
|
-
//#region src/configs/deMorgan.ts
|
|
2320
|
+
// src/configs/deMorgan.ts
|
|
2347
2321
|
/**
|
|
2348
2322
|
* Config for optimize logic
|
|
2349
2323
|
*
|
|
@@ -2360,8 +2334,7 @@ const configDeMorgan = (options = {}) => [{
|
|
|
2360
2334
|
...options.overrides
|
|
2361
2335
|
}
|
|
2362
2336
|
}];
|
|
2363
|
-
|
|
2364
|
-
//#region src/configs/markdown.ts
|
|
2337
|
+
// src/configs/markdown.ts
|
|
2365
2338
|
/**
|
|
2366
2339
|
* Config for markdown files
|
|
2367
2340
|
*
|
|
@@ -2426,8 +2399,7 @@ const configMarkdown = (options = {}) => {
|
|
|
2426
2399
|
}
|
|
2427
2400
|
];
|
|
2428
2401
|
};
|
|
2429
|
-
|
|
2430
|
-
//#region src/configs/prettier.ts
|
|
2402
|
+
// src/configs/prettier.ts
|
|
2431
2403
|
/**
|
|
2432
2404
|
* Config for using prettier
|
|
2433
2405
|
*
|
|
@@ -2626,8 +2598,7 @@ const PERFECTIONIST = Object.freeze({
|
|
|
2626
2598
|
"unknown"
|
|
2627
2599
|
]
|
|
2628
2600
|
});
|
|
2629
|
-
|
|
2630
|
-
//#region src/configs/specials.ts
|
|
2601
|
+
// src/configs/specials.ts
|
|
2631
2602
|
/**
|
|
2632
2603
|
* Config for special files
|
|
2633
2604
|
*
|
|
@@ -2716,8 +2687,7 @@ const configSpecials = (options = {}) => {
|
|
|
2716
2687
|
if (additionalConfigs) configs.push(...additionalConfigs);
|
|
2717
2688
|
return configs;
|
|
2718
2689
|
};
|
|
2719
|
-
|
|
2720
|
-
//#region src/configs/gitignore.ts
|
|
2690
|
+
// src/configs/gitignore.ts
|
|
2721
2691
|
/**
|
|
2722
2692
|
* Config for respect `.gitignore`
|
|
2723
2693
|
*
|
|
@@ -2735,8 +2705,7 @@ const configGitIgnore = (options = {}) => {
|
|
|
2735
2705
|
name: "ntnyq/gitignore"
|
|
2736
2706
|
}];
|
|
2737
2707
|
};
|
|
2738
|
-
|
|
2739
|
-
//#region src/configs/javascript.ts
|
|
2708
|
+
// src/configs/javascript.ts
|
|
2740
2709
|
const strictRules = {
|
|
2741
2710
|
complexity: ["error", { max: 30 }],
|
|
2742
2711
|
"max-depth": ["error", { max: 5 }],
|
|
@@ -2944,8 +2913,7 @@ const configJSX = () => [{
|
|
|
2944
2913
|
files: [GLOB_JSX_ONLY],
|
|
2945
2914
|
languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }
|
|
2946
2915
|
}];
|
|
2947
|
-
|
|
2948
|
-
//#region src/configs/typescript.ts
|
|
2916
|
+
// src/configs/typescript.ts
|
|
2949
2917
|
/**
|
|
2950
2918
|
* @see {@link https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended-type-checked.ts}
|
|
2951
2919
|
*/
|
|
@@ -3140,8 +3108,7 @@ const configTypeScript = (options = {}) => {
|
|
|
3140
3108
|
}
|
|
3141
3109
|
];
|
|
3142
3110
|
};
|
|
3143
|
-
|
|
3144
|
-
//#region src/configs/eslintPlugin.ts
|
|
3111
|
+
// src/configs/eslintPlugin.ts
|
|
3145
3112
|
/**
|
|
3146
3113
|
* Config for eslint plugin
|
|
3147
3114
|
*
|
|
@@ -3163,8 +3130,7 @@ const configESLintPlugin = async (options = {}) => {
|
|
|
3163
3130
|
}
|
|
3164
3131
|
}];
|
|
3165
3132
|
};
|
|
3166
|
-
|
|
3167
|
-
//#region src/configs/githubAction.ts
|
|
3133
|
+
// src/configs/githubAction.ts
|
|
3168
3134
|
/**
|
|
3169
3135
|
* Config for github action files
|
|
3170
3136
|
*
|
|
@@ -3190,8 +3156,7 @@ const configGitHubAction = (options = {}) => {
|
|
|
3190
3156
|
}
|
|
3191
3157
|
}];
|
|
3192
3158
|
};
|
|
3193
|
-
|
|
3194
|
-
//#region src/configs/perfectionist.ts
|
|
3159
|
+
// src/configs/perfectionist.ts
|
|
3195
3160
|
/**
|
|
3196
3161
|
* Config for sorting imports, exports, objects and etc
|
|
3197
3162
|
*
|
|
@@ -3349,8 +3314,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
3349
3314
|
});
|
|
3350
3315
|
return configs;
|
|
3351
3316
|
};
|
|
3352
|
-
|
|
3353
|
-
//#region src/configs/unusedImports.ts
|
|
3317
|
+
// src/configs/unusedImports.ts
|
|
3354
3318
|
/**
|
|
3355
3319
|
* Config for remove unused imports
|
|
3356
3320
|
*
|
|
@@ -3382,8 +3346,7 @@ const configUnusedImports = async (options = {}) => {
|
|
|
3382
3346
|
}
|
|
3383
3347
|
}];
|
|
3384
3348
|
};
|
|
3385
|
-
|
|
3386
|
-
//#region src/configs/eslintComments.ts
|
|
3349
|
+
// src/configs/eslintComments.ts
|
|
3387
3350
|
/**
|
|
3388
3351
|
* Config for eslint comments
|
|
3389
3352
|
*
|
|
@@ -3401,8 +3364,7 @@ const configESLintComments = (options = {}) => [{
|
|
|
3401
3364
|
...options.overrides
|
|
3402
3365
|
}
|
|
3403
3366
|
}];
|
|
3404
|
-
|
|
3405
|
-
//#region src/core.ts
|
|
3367
|
+
// src/core.ts
|
|
3406
3368
|
/**
|
|
3407
3369
|
* @file factory function to create ESLint config
|
|
3408
3370
|
*/
|
|
@@ -3527,5 +3489,4 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3527
3489
|
else if (enableOxfmt) formatterConfigs.push(...oxfmtConfigs);
|
|
3528
3490
|
return new FlatConfigComposer(...configs, ...userConfigs, ...formatterConfigs);
|
|
3529
3491
|
}
|
|
3530
|
-
//#endregion
|
|
3531
3492
|
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSON_SCHEMA, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_PNPM_WORKSPACE_YAML, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_SRC_EXTENSIONS, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_VUE_COMPOSABLES, GLOB_YAML, PERFECTIONIST, configAntfu, configAstro, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configGitHubAction, configGitIgnore, configHtml, configIgnores, configImportX, configJSX, configJavaScript, configJsdoc, configJsonc, configMarkdown, configNode, configNtnyq, configOxfmt, configPerfectionist, configPinia, configPnpm, configPrettier, configRegexp, configSVGO, configSort, configSpecials, configSvelte, configTest, configToml, configTypeScript, configUnicorn, configUnoCSS, configUnusedImports, configVue, configYml, configsTypeScript, defineESLintConfig, ensurePackages, getOverrides, hasAutoImport, hasOxfmt, hasPinia, hasPrettier, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunBySpecifyPackages, mergeProcessors, parserJsonc, parserPlain, parserToml, parserTypeScript, parserVue, parserYaml, pluginAntfu, pluginDeMorgan, pluginDepend, pluginESLintComments, pluginGitHubAction, pluginImportX, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNoOnlyTests, pluginNode, pluginNtnyq, pluginOxfmt, pluginPerfectionist, pluginPinia, pluginPrettier, pluginRegexp, pluginSvgo, pluginToml, pluginTypeScript, pluginUnicorn, pluginUnoCSS, pluginVitest, pluginVue, pluginVuePerfectionist, pluginYml, processorPassThrough, processorVueBlocks, resolveSubOptions };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.29",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -89,61 +89,61 @@
|
|
|
89
89
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.8.1",
|
|
90
90
|
"@eslint/js": "^10.0.1",
|
|
91
91
|
"@eslint/markdown": "^8.0.3",
|
|
92
|
-
"@ntnyq/utils": "^0.
|
|
93
|
-
"@unocss/eslint-plugin": "^66.
|
|
94
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
92
|
+
"@ntnyq/utils": "^0.24.0",
|
|
93
|
+
"@unocss/eslint-plugin": "^66.12.0",
|
|
94
|
+
"@vitest/eslint-plugin": "^1.6.28",
|
|
95
95
|
"eslint-config-flat-gitignore": "^2.4.0",
|
|
96
96
|
"eslint-flat-config-utils": "^3.2.0",
|
|
97
97
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
98
98
|
"eslint-merge-processors": "^2.0.0",
|
|
99
99
|
"eslint-parser-plain": "^0.1.1",
|
|
100
|
-
"eslint-plugin-antfu": "^3.
|
|
100
|
+
"eslint-plugin-antfu": "^3.3.1",
|
|
101
101
|
"eslint-plugin-command": "^4.0.0",
|
|
102
|
-
"eslint-plugin-de-morgan": "^2.
|
|
102
|
+
"eslint-plugin-de-morgan": "^2.3.0",
|
|
103
103
|
"eslint-plugin-depend": "^1.5.0",
|
|
104
104
|
"eslint-plugin-github-action": "^0.4.0",
|
|
105
105
|
"eslint-plugin-import-x": "^4.17.1",
|
|
106
|
-
"eslint-plugin-jsdoc": "^65.
|
|
106
|
+
"eslint-plugin-jsdoc": "^65.4.2",
|
|
107
107
|
"eslint-plugin-jsonc": "^3.4.2",
|
|
108
108
|
"eslint-plugin-n": "^18.5.0",
|
|
109
109
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
110
110
|
"eslint-plugin-ntnyq": "^0.19.1",
|
|
111
|
-
"eslint-plugin-oxfmt": "^0.
|
|
112
|
-
"eslint-plugin-perfectionist": "^5.
|
|
111
|
+
"eslint-plugin-oxfmt": "^0.30.0",
|
|
112
|
+
"eslint-plugin-perfectionist": "^5.13.0",
|
|
113
113
|
"eslint-plugin-pinia": "^0.4.2",
|
|
114
114
|
"eslint-plugin-prettier": "^5.5.7",
|
|
115
|
-
"eslint-plugin-regexp": "^3.3.
|
|
115
|
+
"eslint-plugin-regexp": "^3.3.2",
|
|
116
116
|
"eslint-plugin-svgo": "^0.14.1",
|
|
117
117
|
"eslint-plugin-toml": "^1.5.0",
|
|
118
|
-
"eslint-plugin-unicorn": "^
|
|
119
|
-
"eslint-plugin-vue": "^10.
|
|
120
|
-
"eslint-plugin-vue-perfectionist": "^0.
|
|
118
|
+
"eslint-plugin-unicorn": "^79.0.0",
|
|
119
|
+
"eslint-plugin-vue": "^10.12.0",
|
|
120
|
+
"eslint-plugin-vue-perfectionist": "^0.13.0",
|
|
121
121
|
"eslint-plugin-yml": "^3.9.0",
|
|
122
122
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
123
123
|
"globals": "^17.13.0",
|
|
124
124
|
"jsonc-eslint-parser": "^3.3.0",
|
|
125
125
|
"local-pkg": "^1.2.1",
|
|
126
126
|
"toml-eslint-parser": "^1.0.3",
|
|
127
|
-
"typescript-eslint": "^8.
|
|
127
|
+
"typescript-eslint": "^8.72.1",
|
|
128
128
|
"vue-eslint-parser": "^10.4.1",
|
|
129
129
|
"yaml-eslint-parser": "^2.1.0"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
132
|
-
"@types/node": "^26.6.
|
|
133
|
-
"@typescript-eslint/types": "^8.
|
|
132
|
+
"@types/node": "^26.6.6",
|
|
133
|
+
"@typescript-eslint/types": "^8.72.1",
|
|
134
134
|
"@typescript/native-preview": "npm:typescript@^7.0.2",
|
|
135
135
|
"bumpp": "^12.3.0",
|
|
136
136
|
"consola": "^3.4.2",
|
|
137
137
|
"eslint": "^10.13.0",
|
|
138
|
-
"eslint-typegen": "^2.3.
|
|
138
|
+
"eslint-typegen": "^2.3.2",
|
|
139
139
|
"husky": "^9.1.7",
|
|
140
140
|
"jiti": "^2.7.0",
|
|
141
141
|
"nano-staged": "^1.0.2",
|
|
142
|
-
"npm-run-all2": "^9.0.
|
|
143
|
-
"oxfmt": "^0.
|
|
142
|
+
"npm-run-all2": "^9.0.4",
|
|
143
|
+
"oxfmt": "^0.75.0",
|
|
144
144
|
"prettier": "^3.9.10",
|
|
145
145
|
"tinyglobby": "^0.2.17",
|
|
146
|
-
"tsdown": "^0.23.
|
|
146
|
+
"tsdown": "^0.23.4",
|
|
147
147
|
"tsx": "^4.23.15",
|
|
148
148
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
149
149
|
"uncase": "^0.3.0",
|