@ntnyq/eslint-config 5.8.0 → 6.0.0-beta.1
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 +47 -37
- package/dist/index.d.mts +7662 -6912
- package/dist/index.mjs +107 -23
- package/package.json +47 -44
package/dist/index.mjs
CHANGED
|
@@ -17,6 +17,7 @@ import pluginAntfu from "eslint-plugin-antfu";
|
|
|
17
17
|
import pluginJsdoc from "eslint-plugin-jsdoc";
|
|
18
18
|
import pluginJsonc from "eslint-plugin-jsonc";
|
|
19
19
|
import pluginNtnyq from "eslint-plugin-ntnyq";
|
|
20
|
+
import pluginOxfmt from "eslint-plugin-oxfmt";
|
|
20
21
|
import pluginPinia from "eslint-plugin-pinia";
|
|
21
22
|
import pluginDepend from "eslint-plugin-depend";
|
|
22
23
|
import pluginUnoCSS from "@unocss/eslint-plugin";
|
|
@@ -28,7 +29,7 @@ import pluginDeMorgan from "eslint-plugin-de-morgan";
|
|
|
28
29
|
import pluginNoOnlyTests from "eslint-plugin-no-only-tests";
|
|
29
30
|
import pluginGitHubAction from "eslint-plugin-github-action";
|
|
30
31
|
import pluginPerfectionist from "eslint-plugin-perfectionist";
|
|
31
|
-
import
|
|
32
|
+
import * as pluginESLintComments from "@eslint-community/eslint-plugin-eslint-comments";
|
|
32
33
|
import processorVueBlocks from "eslint-processor-vue-blocks";
|
|
33
34
|
import { resolve } from "node:path";
|
|
34
35
|
import process from "node:process";
|
|
@@ -127,6 +128,7 @@ const GLOB_EXCLUDE = [
|
|
|
127
128
|
"**/auto-import?(s).d.ts",
|
|
128
129
|
"**/components.d.ts",
|
|
129
130
|
"**/typed-router.d.ts",
|
|
131
|
+
"**/routes.d.ts",
|
|
130
132
|
"**/uni-pages.d.ts",
|
|
131
133
|
"**/coverage",
|
|
132
134
|
"**/fixtures",
|
|
@@ -294,8 +296,10 @@ const unCategorizedRules = {
|
|
|
294
296
|
"vue/no-deprecated-delete-set": "error",
|
|
295
297
|
"vue/no-deprecated-model-definition": ["error", { allowVue3Compat: true }],
|
|
296
298
|
"vue/no-duplicate-attr-inheritance": ["error", { checkMultiRootNodes: true }],
|
|
299
|
+
"vue/no-duplicate-class-names": "error",
|
|
297
300
|
"vue/no-empty-component-block": "error",
|
|
298
301
|
"vue/no-irregular-whitespace": "error",
|
|
302
|
+
"vue/no-literals-in-template": "error",
|
|
299
303
|
"vue/no-multiple-objects-in-class": "error",
|
|
300
304
|
"vue/no-negated-v-if-condition": "error",
|
|
301
305
|
"vue/no-ref-object-reactivity-loss": "error",
|
|
@@ -533,6 +537,11 @@ const hasTypeScript = () => isPackageExists("typescript");
|
|
|
533
537
|
const hasShadcnVue = () => (isPackageExists("radix-vue") || isPackageExists("reka-ui")) && isPackageExists("class-variance-authority") && isPackageExists("clsx");
|
|
534
538
|
const hasUnoCSS = () => isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
|
|
535
539
|
const hasVue = () => isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("vuepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", { paths: [resolve(process.cwd(), "playground"), resolve(process.cwd(), "docs")] });
|
|
540
|
+
/**
|
|
541
|
+
* Formatters
|
|
542
|
+
*/
|
|
543
|
+
const hasOxfmt = () => isPackageExists("oxfmt");
|
|
544
|
+
const hasPrettier = () => isPackageExists("prettier");
|
|
536
545
|
|
|
537
546
|
//#endregion
|
|
538
547
|
//#region src/utils/resolveSubOptions.ts
|
|
@@ -1512,6 +1521,30 @@ const configNtnyq = (options = {}) => [{
|
|
|
1512
1521
|
}
|
|
1513
1522
|
}];
|
|
1514
1523
|
|
|
1524
|
+
//#endregion
|
|
1525
|
+
//#region src/configs/oxfmt.ts
|
|
1526
|
+
/**
|
|
1527
|
+
* Config for using oxfmt
|
|
1528
|
+
*
|
|
1529
|
+
* @see {@link https://github.com/ntnyq/eslint-plugin-oxfmt}
|
|
1530
|
+
*
|
|
1531
|
+
* @returns ESLint configs
|
|
1532
|
+
*/
|
|
1533
|
+
const configOxfmt = (options = {}) => {
|
|
1534
|
+
const { files = [GLOB_SRC], ignores = [] } = options;
|
|
1535
|
+
return [{
|
|
1536
|
+
name: "ntnyq/oxfmt",
|
|
1537
|
+
files,
|
|
1538
|
+
ignores,
|
|
1539
|
+
plugins: { oxfmt: pluginOxfmt },
|
|
1540
|
+
languageOptions: { parser: parserPlain },
|
|
1541
|
+
rules: {
|
|
1542
|
+
"oxfmt/oxfmt": "error",
|
|
1543
|
+
...options.overrides
|
|
1544
|
+
}
|
|
1545
|
+
}];
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1515
1548
|
//#endregion
|
|
1516
1549
|
//#region src/configs/pinia.ts
|
|
1517
1550
|
/**
|
|
@@ -1697,14 +1730,16 @@ const sortIntersectionTypesOrUnionTypesGroups = [
|
|
|
1697
1730
|
"operator",
|
|
1698
1731
|
"tuple",
|
|
1699
1732
|
"union",
|
|
1700
|
-
"nullish"
|
|
1733
|
+
"nullish",
|
|
1734
|
+
"unknown"
|
|
1701
1735
|
];
|
|
1702
1736
|
/**
|
|
1703
1737
|
* Shared option `groups` for rule `sort-imports`
|
|
1704
1738
|
*
|
|
1705
1739
|
* @see {@link https://perfectionist.dev/rules/sort-imports}
|
|
1740
|
+
* TODO: support v5 added selectors and modifiers
|
|
1706
1741
|
*/
|
|
1707
|
-
const
|
|
1742
|
+
const sortImportsGroups = [
|
|
1708
1743
|
"side-effect-style",
|
|
1709
1744
|
"value-style",
|
|
1710
1745
|
"value-builtin",
|
|
@@ -1729,6 +1764,7 @@ const sortImportsTypes = [
|
|
|
1729
1764
|
* Shared option `groups` for rule `sort-exports`
|
|
1730
1765
|
*
|
|
1731
1766
|
* @see {@link https://perfectionist.dev/rules/sort-exports}
|
|
1767
|
+
* TODO: support v5 added selectors and modifiers
|
|
1732
1768
|
*/
|
|
1733
1769
|
const sortExportsGroups = [
|
|
1734
1770
|
"value-export",
|
|
@@ -1756,22 +1792,58 @@ const sortNamedImportsGroups = [
|
|
|
1756
1792
|
"unknown"
|
|
1757
1793
|
];
|
|
1758
1794
|
/**
|
|
1759
|
-
* Shared option `groups` for rule `sort-
|
|
1795
|
+
* Shared option `groups` for rule `sort-import-attributes`
|
|
1760
1796
|
*
|
|
1761
|
-
*
|
|
1797
|
+
* @see {@link https://perfectionist.dev/rules/sort-import-attributes}
|
|
1798
|
+
*/
|
|
1799
|
+
const sortImportAttributesGroups = ["unknown"];
|
|
1800
|
+
/**
|
|
1801
|
+
* Shared option `groups` for rule `sort-export-attributes`
|
|
1802
|
+
*
|
|
1803
|
+
* @see {@link https://perfectionist.dev/rules/sort-export-attributes}
|
|
1804
|
+
*/
|
|
1805
|
+
const sortExportAttributesGroups = ["unknown"];
|
|
1806
|
+
/**
|
|
1807
|
+
* Shared option `groups` for rule `sort-classes`
|
|
1762
1808
|
*
|
|
1763
1809
|
* @see {@link https://perfectionist.dev/rules/sort-classes}
|
|
1764
1810
|
*/
|
|
1765
|
-
const sortClassesGroups = [
|
|
1811
|
+
const sortClassesGroups = [
|
|
1812
|
+
["static-property", "static-accessor-property"],
|
|
1813
|
+
["static-get-method", "static-set-method"],
|
|
1814
|
+
["protected-static-property", "protected-static-accessor-property"],
|
|
1815
|
+
["protected-static-get-method", "protected-static-set-method"],
|
|
1816
|
+
["private-static-property", "private-static-accessor-property"],
|
|
1817
|
+
["private-static-get-method", "private-static-set-method"],
|
|
1818
|
+
"static-block",
|
|
1819
|
+
["property", "accessor-property"],
|
|
1820
|
+
["get-method", "set-method"],
|
|
1821
|
+
["protected-property", "protected-accessor-property"],
|
|
1822
|
+
["protected-get-method", "protected-set-method"],
|
|
1823
|
+
["private-property", "private-accessor-property"],
|
|
1824
|
+
["private-get-method", "private-set-method"],
|
|
1825
|
+
"constructor",
|
|
1826
|
+
["static-method", "static-function-property"],
|
|
1827
|
+
["protected-static-method", "protected-static-function-property"],
|
|
1828
|
+
["private-static-method", "private-static-function-property"],
|
|
1829
|
+
["method", "function-property"],
|
|
1830
|
+
["protected-method", "protected-function-property"],
|
|
1831
|
+
["private-method", "private-function-property"],
|
|
1832
|
+
"unknown",
|
|
1833
|
+
"index-signature"
|
|
1834
|
+
];
|
|
1766
1835
|
/**
|
|
1767
1836
|
* Shared constants about eslint-plugin-perfectionist
|
|
1837
|
+
*
|
|
1768
1838
|
*/
|
|
1769
1839
|
const PERFECTIONIST = Object.freeze({
|
|
1770
1840
|
partialRuleOptions,
|
|
1771
1841
|
pluginSettings,
|
|
1772
1842
|
sortClassesGroups,
|
|
1843
|
+
sortExportAttributesGroups,
|
|
1773
1844
|
sortExportsGroups,
|
|
1774
|
-
|
|
1845
|
+
sortImportAttributesGroups,
|
|
1846
|
+
sortImportsGroups,
|
|
1775
1847
|
sortInterfacesOrObjectTypesGroups,
|
|
1776
1848
|
sortIntersectionTypesOrUnionTypesGroups,
|
|
1777
1849
|
sortNamedExportsGroups,
|
|
@@ -1997,7 +2069,7 @@ const commands = [regexper];
|
|
|
1997
2069
|
//#endregion
|
|
1998
2070
|
//#region src/configs/command.ts
|
|
1999
2071
|
/**
|
|
2000
|
-
* Config for
|
|
2072
|
+
* Config for using comments as codemod
|
|
2001
2073
|
*
|
|
2002
2074
|
* @see {@link https://github.com/antfu/eslint-plugin-command}
|
|
2003
2075
|
*
|
|
@@ -2160,7 +2232,7 @@ const configUnicorn = (options = {}) => {
|
|
|
2160
2232
|
"unicorn/prefer-type-error": "error",
|
|
2161
2233
|
"unicorn/throw-new-error": "error",
|
|
2162
2234
|
"unicorn/no-zero-fractions": "error",
|
|
2163
|
-
"unicorn/number-literal-case": "error",
|
|
2235
|
+
"unicorn/number-literal-case": ["error", { hexadecimalValue: "lowercase" }],
|
|
2164
2236
|
"unicorn/prefer-number-properties": "error",
|
|
2165
2237
|
"unicorn/prefer-bigint-literals": "error",
|
|
2166
2238
|
"unicorn/better-regex": "off",
|
|
@@ -2947,14 +3019,22 @@ const configPerfectionist = (options = {}) => {
|
|
|
2947
3019
|
partitionByComment
|
|
2948
3020
|
};
|
|
2949
3021
|
const commonRules = {
|
|
3022
|
+
"perfectionist/sort-export-attributes": ["error", {
|
|
3023
|
+
...sharedOptionsWithNewlinesBetween,
|
|
3024
|
+
groups: PERFECTIONIST.sortExportAttributesGroups
|
|
3025
|
+
}],
|
|
2950
3026
|
"perfectionist/sort-exports": ["error", {
|
|
2951
3027
|
...sharedOptionsWithNewlinesBetween,
|
|
2952
3028
|
groups: PERFECTIONIST.sortExportsGroups,
|
|
2953
3029
|
type: "line-length"
|
|
2954
3030
|
}],
|
|
3031
|
+
"perfectionist/sort-import-attributes": ["error", {
|
|
3032
|
+
...sharedOptionsWithNewlinesBetween,
|
|
3033
|
+
groups: PERFECTIONIST.sortImportAttributesGroups
|
|
3034
|
+
}],
|
|
2955
3035
|
"perfectionist/sort-imports": ["error", {
|
|
2956
3036
|
...sharedOptionsWithNewlinesBetween,
|
|
2957
|
-
groups: PERFECTIONIST.
|
|
3037
|
+
groups: PERFECTIONIST.sortImportsGroups,
|
|
2958
3038
|
internalPattern: [
|
|
2959
3039
|
"^~/.+",
|
|
2960
3040
|
"^@/.+",
|
|
@@ -3019,10 +3099,13 @@ const configPerfectionist = (options = {}) => {
|
|
|
3019
3099
|
"perfectionist/sort-switch-case": "error",
|
|
3020
3100
|
"perfectionist/sort-variable-declarations": ["error", { partitionByComment }]
|
|
3021
3101
|
};
|
|
3102
|
+
const sharedConfig = {
|
|
3103
|
+
plugins: { perfectionist: pluginPerfectionist },
|
|
3104
|
+
settings: { perfectionist: PERFECTIONIST.pluginSettings }
|
|
3105
|
+
};
|
|
3022
3106
|
const configs = [{
|
|
3023
3107
|
name: options.all ? "ntnyq/perfectionist/all" : "ntnyq/perfectionist/common",
|
|
3024
|
-
|
|
3025
|
-
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
3108
|
+
...sharedConfig,
|
|
3026
3109
|
rules: {
|
|
3027
3110
|
...commonRules,
|
|
3028
3111
|
...options.all ? {
|
|
@@ -3039,8 +3122,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
3039
3122
|
if (enableSortEnums) configs.push({
|
|
3040
3123
|
name: "ntnyq/perfectionist/enums",
|
|
3041
3124
|
files: filesEnums,
|
|
3042
|
-
|
|
3043
|
-
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
3125
|
+
...sharedConfig,
|
|
3044
3126
|
rules: {
|
|
3045
3127
|
...sharedRules$1,
|
|
3046
3128
|
...sortEnumsRules,
|
|
@@ -3050,8 +3132,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
3050
3132
|
if (enableSortTypes) configs.push({
|
|
3051
3133
|
name: "ntnyq/perfectionist/types",
|
|
3052
3134
|
files: filesTypes,
|
|
3053
|
-
|
|
3054
|
-
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
3135
|
+
...sharedConfig,
|
|
3055
3136
|
rules: {
|
|
3056
3137
|
...sharedRules$1,
|
|
3057
3138
|
...sortTypesRules,
|
|
@@ -3061,8 +3142,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
3061
3142
|
if (enableSortConstants) configs.push({
|
|
3062
3143
|
name: "ntnyq/perfectionist/constants",
|
|
3063
3144
|
files: filesConstants,
|
|
3064
|
-
|
|
3065
|
-
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
3145
|
+
...sharedConfig,
|
|
3066
3146
|
rules: {
|
|
3067
3147
|
...sharedRules$1,
|
|
3068
3148
|
...sortConstantsRules,
|
|
@@ -3118,9 +3198,9 @@ const configUnusedImports = async (options = {}) => {
|
|
|
3118
3198
|
*/
|
|
3119
3199
|
const configESLintComments = (options = {}) => [{
|
|
3120
3200
|
name: "ntnyq/eslint-comments",
|
|
3121
|
-
plugins: { "@eslint-community/eslint-comments":
|
|
3201
|
+
plugins: { "@eslint-community/eslint-comments": pluginESLintComments },
|
|
3122
3202
|
rules: {
|
|
3123
|
-
...
|
|
3203
|
+
...pluginESLintComments.configs.recommended.rules,
|
|
3124
3204
|
"@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
3125
3205
|
...options.overrides
|
|
3126
3206
|
}
|
|
@@ -3135,7 +3215,7 @@ const configESLintComments = (options = {}) => [{
|
|
|
3135
3215
|
* Config factory
|
|
3136
3216
|
*/
|
|
3137
3217
|
function defineESLintConfig(options = {}, ...userConfigs) {
|
|
3138
|
-
const { shareable = {}, ignores: userIgnores = [], vue: enableVue = hasVue(), pinia: enablePinia = hasPinia(), test: enableTest = hasVitest(), unocss: enableUnoCSS = hasUnoCSS(), typescript: enableTypeScript = hasTypeScript(), yml: enableYML = true, sort: enableSort = true, toml: enableTOML = true, jsonc: enableJSONC = true, antfu: enableAntfu = true, ntnyq: enableNtnyq = true, depend: enableDepend = true, regexp: enableRegexp = true, unicorn: enableUnicorn = true, deMorgan: enableDeMorgan = true,
|
|
3218
|
+
const { shareable = {}, ignores: userIgnores = [], vue: enableVue = hasVue(), pinia: enablePinia = hasPinia(), test: enableTest = hasVitest(), unocss: enableUnoCSS = hasUnoCSS(), typescript: enableTypeScript = hasTypeScript(), oxfmt: enableOxfmt = hasOxfmt(), prettier: enablePrettier = hasPrettier(), yml: enableYML = true, sort: enableSort = true, toml: enableTOML = true, jsonc: enableJSONC = true, antfu: enableAntfu = true, ntnyq: enableNtnyq = true, depend: enableDepend = true, regexp: enableRegexp = true, unicorn: enableUnicorn = true, deMorgan: enableDeMorgan = true, markdown: enableMarkdown = true, gitignore: enableGitIgnore = true, jsdoc: enableJsdoc = true, importX: enableImportX = true, specials: enableSpecials = true, githubAction: enableGitHubAction = true, perfectionist: enablePerfectionist = true, pnpm: enablePnpm = false, svgo: enableSVGO = false, html: enableHTML = false, astro: enableAstro = false, svelte: enableSvelte = false, eslintPlugin: enableESLintPlugin = false } = options;
|
|
3139
3219
|
const configs = [];
|
|
3140
3220
|
const { ecmaVersion = "latest", extraFileExtensions = [] } = shareable;
|
|
3141
3221
|
if (enableVue) extraFileExtensions.push(".vue");
|
|
@@ -3236,12 +3316,16 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3236
3316
|
overrides: getOverrides(options, "html")
|
|
3237
3317
|
}));
|
|
3238
3318
|
if (enableSpecials) configs.push(configSpecials(resolveSubOptions(options, "specials")));
|
|
3319
|
+
const oxfmtConfigs = enableOxfmt ? configOxfmt({
|
|
3320
|
+
...resolveSubOptions(options, "oxfmt"),
|
|
3321
|
+
overrides: getOverrides(options, "oxfmt")
|
|
3322
|
+
}) : [];
|
|
3239
3323
|
const prettierConfigs = enablePrettier ? configPrettier({
|
|
3240
3324
|
...resolveSubOptions(options, "prettier"),
|
|
3241
3325
|
overrides: getOverrides(options, "prettier")
|
|
3242
3326
|
}) : [];
|
|
3243
|
-
return new FlatConfigComposer(...configs, ...userConfigs, ...prettierConfigs);
|
|
3327
|
+
return new FlatConfigComposer(...configs, ...userConfigs, ...oxfmtConfigs, ...prettierConfigs);
|
|
3244
3328
|
}
|
|
3245
3329
|
|
|
3246
3330
|
//#endregion
|
|
3247
|
-
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_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_YAML, PERFECTIONIST, PRETTIER_DEFAULT_OPTIONS, configAntfu, configAstro, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configFormat, configGitHubAction, configGitIgnore, configHtml, configIgnores, configImportX, configJSX, configJavaScript, configJsdoc, configJsonc, configMarkdown, configNode, configNtnyq, configPerfectionist, configPinia, configPnpm, configPrettier, configRegexp, configSVGO, configSort, configSpecials, configSvelte, configTest, configToml, configTypeScript, configUnicorn, configUnoCSS, configUnusedImports, configVue, configYml, configsTypeScript, defineESLintConfig, ensurePackages, getOverrides, hasPinia, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunBySpecifyPackages, mergePrettierOptions, mergeProcessors, parserJsonc, parserPlain, parserToml, parserTypeScript, parserVue, parserYaml, pluginAntfu,
|
|
3331
|
+
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_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_YAML, PERFECTIONIST, PRETTIER_DEFAULT_OPTIONS, configAntfu, configAstro, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configFormat, 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, hasOxfmt, hasPinia, hasPrettier, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunBySpecifyPackages, mergePrettierOptions, 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, 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": "
|
|
4
|
+
"version": "6.0.0-beta.1",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
],
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public",
|
|
36
|
-
"tag": "
|
|
36
|
+
"tag": "next"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
40
|
-
"@html-eslint/parser": "^0.
|
|
39
|
+
"@html-eslint/eslint-plugin": "^0.52.0",
|
|
40
|
+
"@html-eslint/parser": "^0.52.0",
|
|
41
41
|
"astro-eslint-parser": "^1.2.2",
|
|
42
|
-
"eslint": "^9.
|
|
43
|
-
"eslint-plugin-astro": "^1.
|
|
44
|
-
"eslint-plugin-eslint-plugin": "^7.
|
|
45
|
-
"eslint-plugin-format": "^1.0
|
|
46
|
-
"eslint-plugin-pnpm": "^1.3
|
|
47
|
-
"eslint-plugin-svelte": "^3.13.
|
|
42
|
+
"eslint": "^9.38.0",
|
|
43
|
+
"eslint-plugin-astro": "^1.5.0",
|
|
44
|
+
"eslint-plugin-eslint-plugin": "^7.3.0",
|
|
45
|
+
"eslint-plugin-format": "^1.2.0",
|
|
46
|
+
"eslint-plugin-pnpm": "^1.4.3",
|
|
47
|
+
"eslint-plugin-svelte": "^3.13.1",
|
|
48
48
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
49
|
-
"svelte": "^5.
|
|
50
|
-
"svelte-eslint-parser": "^1.4.
|
|
49
|
+
"svelte": "^5.46.1",
|
|
50
|
+
"svelte-eslint-parser": "^1.4.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"@html-eslint/eslint-plugin": {
|
|
@@ -87,68 +87,71 @@
|
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@antfu/install-pkg": "^1.1.0",
|
|
89
89
|
"@clack/prompts": "^0.11.0",
|
|
90
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
91
|
-
"@eslint/js": "^9.39.
|
|
90
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
|
|
91
|
+
"@eslint/js": "^9.39.2",
|
|
92
92
|
"@eslint/markdown": "^7.5.1",
|
|
93
|
-
"@unocss/eslint-plugin": "^66.
|
|
94
|
-
"@vitest/eslint-plugin": "^1.
|
|
93
|
+
"@unocss/eslint-plugin": "^66.6.0",
|
|
94
|
+
"@vitest/eslint-plugin": "^1.6.6",
|
|
95
95
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
96
96
|
"eslint-flat-config-utils": "^2.1.4",
|
|
97
97
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
98
98
|
"eslint-merge-processors": "^2.0.0",
|
|
99
99
|
"eslint-parser-plain": "^0.1.1",
|
|
100
|
-
"eslint-plugin-antfu": "^3.1.
|
|
101
|
-
"eslint-plugin-command": "^3.
|
|
100
|
+
"eslint-plugin-antfu": "^3.1.3",
|
|
101
|
+
"eslint-plugin-command": "^3.4.0",
|
|
102
102
|
"eslint-plugin-de-morgan": "^2.0.0",
|
|
103
103
|
"eslint-plugin-depend": "^1.4.0",
|
|
104
|
-
"eslint-plugin-github-action": "^0.0
|
|
104
|
+
"eslint-plugin-github-action": "^0.1.0",
|
|
105
105
|
"eslint-plugin-import-x": "^4.16.1",
|
|
106
|
-
"eslint-plugin-jsdoc": "^
|
|
106
|
+
"eslint-plugin-jsdoc": "^62.2.0",
|
|
107
107
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
108
|
-
"eslint-plugin-n": "^17.23.
|
|
108
|
+
"eslint-plugin-n": "^17.23.2",
|
|
109
109
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
110
110
|
"eslint-plugin-ntnyq": "^0.12.0",
|
|
111
|
-
"eslint-plugin-
|
|
112
|
-
"eslint-plugin-
|
|
113
|
-
"eslint-plugin-
|
|
111
|
+
"eslint-plugin-oxfmt": "^0.0.9",
|
|
112
|
+
"eslint-plugin-perfectionist": "^5.3.1",
|
|
113
|
+
"eslint-plugin-pinia": "^0.4.2",
|
|
114
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
114
115
|
"eslint-plugin-regexp": "^2.10.0",
|
|
115
116
|
"eslint-plugin-svgo": "^0.11.3",
|
|
116
|
-
"eslint-plugin-toml": "^0.
|
|
117
|
+
"eslint-plugin-toml": "^1.0.3",
|
|
117
118
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
118
|
-
"eslint-plugin-vue": "^10.
|
|
119
|
-
"eslint-plugin-yml": "^
|
|
119
|
+
"eslint-plugin-vue": "^10.7.0",
|
|
120
|
+
"eslint-plugin-yml": "^3.0.0",
|
|
120
121
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
121
|
-
"globals": "^
|
|
122
|
-
"jsonc-eslint-parser": "^2.4.
|
|
122
|
+
"globals": "^17.0.0",
|
|
123
|
+
"jsonc-eslint-parser": "^2.4.2",
|
|
123
124
|
"local-pkg": "^1.1.2",
|
|
124
|
-
"toml-eslint-parser": "^0.
|
|
125
|
-
"typescript-eslint": "^8.
|
|
125
|
+
"toml-eslint-parser": "^1.0.3",
|
|
126
|
+
"typescript-eslint": "^8.53.1",
|
|
126
127
|
"vue-eslint-parser": "^10.2.0",
|
|
127
|
-
"yaml-eslint-parser": "^
|
|
128
|
+
"yaml-eslint-parser": "^2.0.0"
|
|
128
129
|
},
|
|
129
130
|
"devDependencies": {
|
|
130
131
|
"@ntnyq/prettier-config": "^3.0.1",
|
|
131
|
-
"@types/node": "^
|
|
132
|
-
"@typescript-eslint/types": "^8.
|
|
133
|
-
"@typescript-eslint/utils": "^8.
|
|
134
|
-
"
|
|
132
|
+
"@types/node": "^25.0.9",
|
|
133
|
+
"@typescript-eslint/types": "^8.53.1",
|
|
134
|
+
"@typescript-eslint/utils": "^8.53.1",
|
|
135
|
+
"@typescript/native-preview": "^7.0.0-dev.20260119.1",
|
|
136
|
+
"bumpp": "^10.4.0",
|
|
135
137
|
"consola": "^3.4.2",
|
|
136
|
-
"eslint": "^9.39.
|
|
138
|
+
"eslint": "^9.39.2",
|
|
137
139
|
"eslint-typegen": "^2.3.0",
|
|
138
140
|
"husky": "^9.1.7",
|
|
139
141
|
"jiti": "^2.6.1",
|
|
140
|
-
"nano-staged": "^0.
|
|
142
|
+
"nano-staged": "^0.9.0",
|
|
141
143
|
"npm-run-all2": "^8.0.4",
|
|
142
|
-
"
|
|
144
|
+
"oxfmt": "^0.26.0",
|
|
145
|
+
"prettier": "^3.8.0",
|
|
143
146
|
"tinyglobby": "^0.2.15",
|
|
144
|
-
"tsdown": "^0.
|
|
145
|
-
"tsx": "^4.
|
|
147
|
+
"tsdown": "^0.20.0-beta.3",
|
|
148
|
+
"tsx": "^4.21.0",
|
|
146
149
|
"typescript": "^5.9.3",
|
|
147
150
|
"uncase": "^0.2.0",
|
|
148
|
-
"vitest": "^4.0.
|
|
151
|
+
"vitest": "^4.0.17"
|
|
149
152
|
},
|
|
150
153
|
"engines": {
|
|
151
|
-
"node": "^20.
|
|
154
|
+
"node": "^20.19.0 || ^22.13.0 || >=24"
|
|
152
155
|
},
|
|
153
156
|
"nano-staged": {
|
|
154
157
|
"*.{js,ts,mjs,cjs,md,vue,svg,yml,yaml,toml,json}": "eslint --fix",
|
|
@@ -168,7 +171,7 @@
|
|
|
168
171
|
"release:check": "run-s build lint test typecheck",
|
|
169
172
|
"release:version": "bumpp",
|
|
170
173
|
"test": "vitest",
|
|
171
|
-
"typecheck": "
|
|
174
|
+
"typecheck": "tsgo --noEmit",
|
|
172
175
|
"types:generate": "tsx scripts/generateType.ts"
|
|
173
176
|
}
|
|
174
177
|
}
|