@ntnyq/eslint-config 6.0.1 → 6.1.0
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 +17 -2
- package/dist/index.mjs +67 -4
- package/package.json +17 -17
package/dist/index.d.mts
CHANGED
|
@@ -8049,7 +8049,7 @@ interface RuleOptions {
|
|
|
8049
8049
|
* disallow object, array, and function literals in template
|
|
8050
8050
|
* @see https://eslint.vuejs.org/rules/no-literals-in-template.html
|
|
8051
8051
|
*/
|
|
8052
|
-
'vue/no-literals-in-template'?: Linter.RuleEntry<
|
|
8052
|
+
'vue/no-literals-in-template'?: Linter.RuleEntry<VueNoLiteralsInTemplate>;
|
|
8053
8053
|
/**
|
|
8054
8054
|
* disallow unnecessary `<template>`
|
|
8055
8055
|
* @see https://eslint.vuejs.org/rules/no-lone-template.html
|
|
@@ -8442,6 +8442,11 @@ interface RuleOptions {
|
|
|
8442
8442
|
* @see https://eslint.vuejs.org/rules/prefer-separate-static-class.html
|
|
8443
8443
|
*/
|
|
8444
8444
|
'vue/prefer-separate-static-class'?: Linter.RuleEntry<[]>;
|
|
8445
|
+
/**
|
|
8446
|
+
* enforce passing a single argument to custom event emissions
|
|
8447
|
+
* @see https://eslint.vuejs.org/rules/prefer-single-event-payload.html
|
|
8448
|
+
*/
|
|
8449
|
+
'vue/prefer-single-event-payload'?: Linter.RuleEntry<[]>;
|
|
8445
8450
|
/**
|
|
8446
8451
|
* Require template literals instead of string concatenation in `<template>`
|
|
8447
8452
|
* @see https://eslint.vuejs.org/rules/prefer-template.html
|
|
@@ -8457,6 +8462,11 @@ interface RuleOptions {
|
|
|
8457
8462
|
* @see https://eslint.vuejs.org/rules/prefer-use-template-ref.html
|
|
8458
8463
|
*/
|
|
8459
8464
|
'vue/prefer-use-template-ref'?: Linter.RuleEntry<[]>;
|
|
8465
|
+
/**
|
|
8466
|
+
* enforce using `v-model` instead of `:prop`/`@update:prop` pair
|
|
8467
|
+
* @see https://eslint.vuejs.org/rules/prefer-v-model.html
|
|
8468
|
+
*/
|
|
8469
|
+
'vue/prefer-v-model'?: Linter.RuleEntry<[]>;
|
|
8460
8470
|
/**
|
|
8461
8471
|
* enforce specific casing for the Prop name in Vue components
|
|
8462
8472
|
* @see https://eslint.vuejs.org/rules/prop-name-casing.html
|
|
@@ -12964,6 +12974,7 @@ type PerfectionistSortClasses = {
|
|
|
12964
12974
|
matchesAstSelector?: string;
|
|
12965
12975
|
};
|
|
12966
12976
|
useExperimentalDependencyDetection?: boolean;
|
|
12977
|
+
newlinesBetweenOverloadSignatures?: ("ignore" | number);
|
|
12967
12978
|
ignoreCallbackDependenciesPatterns?: (({
|
|
12968
12979
|
pattern: string;
|
|
12969
12980
|
flags?: string;
|
|
@@ -14327,6 +14338,7 @@ type PerfectionistSortModules = [] | [{
|
|
|
14327
14338
|
})[];
|
|
14328
14339
|
newlinesBetween?: ("ignore" | number);
|
|
14329
14340
|
useExperimentalDependencyDetection?: boolean;
|
|
14341
|
+
newlinesBetweenOverloadSignatures?: ("ignore" | number);
|
|
14330
14342
|
partitionByComment?: (boolean | (({
|
|
14331
14343
|
pattern: string;
|
|
14332
14344
|
flags?: string;
|
|
@@ -17294,6 +17306,9 @@ type VueNoIrregularWhitespace = [] | [{
|
|
|
17294
17306
|
skipRegExps?: boolean;
|
|
17295
17307
|
skipHTMLAttributeValues?: boolean;
|
|
17296
17308
|
skipHTMLTextContents?: boolean;
|
|
17309
|
+
}]; // ----- vue/no-literals-in-template -----
|
|
17310
|
+
type VueNoLiteralsInTemplate = [] | [{
|
|
17311
|
+
ignores?: string[];
|
|
17297
17312
|
}]; // ----- vue/no-lone-template -----
|
|
17298
17313
|
type VueNoLoneTemplate = [] | [{
|
|
17299
17314
|
ignoreAccessible?: boolean;
|
|
@@ -17448,7 +17463,7 @@ type VueNoUnusedComponents = [] | [{
|
|
|
17448
17463
|
ignoreWhenBindingPresent?: boolean;
|
|
17449
17464
|
}]; // ----- vue/no-unused-properties -----
|
|
17450
17465
|
type VueNoUnusedProperties = [] | [{
|
|
17451
|
-
groups?: ("props" | "data" | "asyncData" | "computed" | "methods" | "setup")[];
|
|
17466
|
+
groups?: ("props" | "data" | "asyncData" | "computed" | "methods" | "setup" | "inject")[];
|
|
17452
17467
|
deepData?: boolean;
|
|
17453
17468
|
ignorePublicMembers?: boolean;
|
|
17454
17469
|
unreferencedOptions?: ("unknownMemberAsUnreferenced" | "returnAsUnreferenced")[];
|
package/dist/index.mjs
CHANGED
|
@@ -155,7 +155,11 @@ const GLOB_EXCLUDE = [
|
|
|
155
155
|
"**/.yarnrc",
|
|
156
156
|
"**/.husky",
|
|
157
157
|
"**/src-tauri/gen",
|
|
158
|
-
"**/src-tauri/target"
|
|
158
|
+
"**/src-tauri/target",
|
|
159
|
+
"**/*.context",
|
|
160
|
+
"**/*.claude",
|
|
161
|
+
"**/*.agents",
|
|
162
|
+
"**/.*/skills"
|
|
159
163
|
];
|
|
160
164
|
//#endregion
|
|
161
165
|
//#region src/configs/vue.ts
|
|
@@ -571,7 +575,7 @@ const configYml = (options = {}) => {
|
|
|
571
575
|
//#region src/utils/env.ts
|
|
572
576
|
const hasPinia = () => isPackageExists("pinia");
|
|
573
577
|
const hasVitest = () => isPackageExists("vitest");
|
|
574
|
-
const hasTypeScript = () => isPackageExists("typescript");
|
|
578
|
+
const hasTypeScript = () => isPackageExists("typescript") || isPackageExists("@typescript/native-preview");
|
|
575
579
|
const hasShadcnVue = () => (isPackageExists("radix-vue") || isPackageExists("reka-ui")) && isPackageExists("class-variance-authority") && isPackageExists("clsx");
|
|
576
580
|
const hasUnoCSS = () => isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
|
|
577
581
|
const hasVue = () => isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("vuepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", { paths: [resolve(process.cwd(), "playground"), resolve(process.cwd(), "docs")] });
|
|
@@ -1344,10 +1348,16 @@ const configJsdoc = (options = {}) => [{
|
|
|
1344
1348
|
name: "ntnyq/jsdoc",
|
|
1345
1349
|
plugins: { jsdoc: pluginJsdoc },
|
|
1346
1350
|
rules: {
|
|
1351
|
+
/**
|
|
1352
|
+
* @pg Disabled rules
|
|
1353
|
+
*/
|
|
1347
1354
|
"jsdoc/prefer-import-tag": "off",
|
|
1348
1355
|
"jsdoc/require-tags": "off",
|
|
1349
1356
|
"jsdoc/tag-lines": "off",
|
|
1350
1357
|
"jsdoc/text-escaping": "off",
|
|
1358
|
+
/**
|
|
1359
|
+
* @pg Warning only rules
|
|
1360
|
+
*/
|
|
1351
1361
|
"jsdoc/check-access": "warn",
|
|
1352
1362
|
"jsdoc/implements-on-classes": "warn",
|
|
1353
1363
|
"jsdoc/require-param-name": "warn",
|
|
@@ -1358,6 +1368,9 @@ const configJsdoc = (options = {}) => [{
|
|
|
1358
1368
|
"jsdoc/require-returns-description": "warn",
|
|
1359
1369
|
"jsdoc/require-template-description": "warn",
|
|
1360
1370
|
"jsdoc/require-yields-check": "warn",
|
|
1371
|
+
/**
|
|
1372
|
+
* @pg Maybe next release
|
|
1373
|
+
*/
|
|
1361
1374
|
"jsdoc/require-next-description": "warn",
|
|
1362
1375
|
"jsdoc/require-next-type": "warn",
|
|
1363
1376
|
"jsdoc/require-throws-description": "warn",
|
|
@@ -1367,6 +1380,9 @@ const configJsdoc = (options = {}) => [{
|
|
|
1367
1380
|
"jsdoc/ts-method-signature-style": "warn",
|
|
1368
1381
|
"jsdoc/ts-no-empty-object-type": "warn",
|
|
1369
1382
|
"jsdoc/ts-no-unnecessary-template-expression": "warn",
|
|
1383
|
+
/**
|
|
1384
|
+
* @pg Enabled rules
|
|
1385
|
+
*/
|
|
1370
1386
|
"jsdoc/check-alignment": "error",
|
|
1371
1387
|
"jsdoc/check-line-alignment": "error",
|
|
1372
1388
|
"jsdoc/check-param-names": "error",
|
|
@@ -1383,6 +1399,9 @@ const configJsdoc = (options = {}) => [{
|
|
|
1383
1399
|
"internal"
|
|
1384
1400
|
] }],
|
|
1385
1401
|
"jsdoc/check-types": "error",
|
|
1402
|
+
/**
|
|
1403
|
+
* @pg Fixable rules
|
|
1404
|
+
*/
|
|
1386
1405
|
"jsdoc/empty-tags": "error",
|
|
1387
1406
|
"jsdoc/multiline-blocks": "error",
|
|
1388
1407
|
"jsdoc/no-bad-blocks": ["error", { ignore: [
|
|
@@ -1919,6 +1938,9 @@ const configUnicorn = (options = {}) => {
|
|
|
1919
1938
|
plugins: { unicorn: pluginUnicorn },
|
|
1920
1939
|
rules: {
|
|
1921
1940
|
"unicorn/explicit-length-check": "off",
|
|
1941
|
+
/**
|
|
1942
|
+
* @see https://caniuse.com/?search=globalThis
|
|
1943
|
+
*/
|
|
1922
1944
|
"unicorn/prefer-global-this": "off",
|
|
1923
1945
|
"unicorn/prefer-top-level-await": "off",
|
|
1924
1946
|
"unicorn/consistent-assert": "error",
|
|
@@ -1955,6 +1977,9 @@ const configUnicorn = (options = {}) => {
|
|
|
1955
1977
|
"unicorn/prefer-structured-clone": "error",
|
|
1956
1978
|
"unicorn/switch-case-braces": ["error", "avoid"],
|
|
1957
1979
|
"unicorn/switch-case-break-position": "error",
|
|
1980
|
+
/**
|
|
1981
|
+
* @pg Error
|
|
1982
|
+
*/
|
|
1958
1983
|
"unicorn/catch-error-name": ["error", {
|
|
1959
1984
|
name: "err",
|
|
1960
1985
|
ignore: ["^_."]
|
|
@@ -1963,19 +1988,40 @@ const configUnicorn = (options = {}) => {
|
|
|
1963
1988
|
"unicorn/no-useless-error-capture-stack-trace": "error",
|
|
1964
1989
|
"unicorn/prefer-type-error": "error",
|
|
1965
1990
|
"unicorn/throw-new-error": "error",
|
|
1991
|
+
/**
|
|
1992
|
+
* @pg Number
|
|
1993
|
+
*/
|
|
1966
1994
|
"unicorn/no-zero-fractions": "error",
|
|
1967
1995
|
"unicorn/number-literal-case": ["error", { hexadecimalValue: "lowercase" }],
|
|
1968
1996
|
"unicorn/prefer-number-properties": "error",
|
|
1997
|
+
/**
|
|
1998
|
+
* @pg BigInt
|
|
1999
|
+
*/
|
|
1969
2000
|
"unicorn/prefer-bigint-literals": "error",
|
|
2001
|
+
/**
|
|
2002
|
+
* @pg RegExp
|
|
2003
|
+
*/
|
|
2004
|
+
/**
|
|
2005
|
+
* Prefer `eslint-plugin-regexp` instead
|
|
2006
|
+
*/
|
|
1970
2007
|
"unicorn/better-regex": "off",
|
|
1971
2008
|
"unicorn/prefer-regexp-test": "error",
|
|
2009
|
+
/**
|
|
2010
|
+
* @pg Date
|
|
2011
|
+
*/
|
|
1972
2012
|
"unicorn/consistent-date-clone": "error",
|
|
1973
2013
|
"unicorn/prefer-date-now": "error",
|
|
2014
|
+
/**
|
|
2015
|
+
* @pg String
|
|
2016
|
+
*/
|
|
1974
2017
|
"unicorn/consistent-template-literal-escape": "error",
|
|
1975
2018
|
"unicorn/prefer-code-point": "error",
|
|
1976
2019
|
"unicorn/prefer-string-slice": "error",
|
|
1977
2020
|
"unicorn/prefer-string-starts-ends-with": "error",
|
|
1978
2021
|
"unicorn/prefer-string-trim-start-end": "error",
|
|
2022
|
+
/**
|
|
2023
|
+
* @pg DOM
|
|
2024
|
+
*/
|
|
1979
2025
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
1980
2026
|
"unicorn/prefer-add-event-listener": "error",
|
|
1981
2027
|
"unicorn/prefer-classlist-toggle": "error",
|
|
@@ -1985,7 +2031,15 @@ const configUnicorn = (options = {}) => {
|
|
|
1985
2031
|
"unicorn/prefer-dom-node-text-content": "error",
|
|
1986
2032
|
"unicorn/prefer-modern-dom-apis": "error",
|
|
1987
2033
|
"unicorn/prefer-query-selector": "error",
|
|
2034
|
+
/**
|
|
2035
|
+
* @pg Array
|
|
2036
|
+
*/
|
|
1988
2037
|
"unicorn/no-array-callback-reference": "off",
|
|
2038
|
+
/**
|
|
2039
|
+
* TODO: chrome 110, baseline 2023 required
|
|
2040
|
+
*
|
|
2041
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toReversed#browser_compatibility
|
|
2042
|
+
*/
|
|
1989
2043
|
"unicorn/no-array-reverse": "off",
|
|
1990
2044
|
"unicorn/no-array-sort": "off",
|
|
1991
2045
|
"unicorn/no-array-method-this-argument": "error",
|
|
@@ -1999,8 +2053,14 @@ const configUnicorn = (options = {}) => {
|
|
|
1999
2053
|
"unicorn/prefer-array-some": "error",
|
|
2000
2054
|
"unicorn/prefer-single-call": "error",
|
|
2001
2055
|
"unicorn/require-array-join-separator": "error",
|
|
2056
|
+
/**
|
|
2057
|
+
* @pg Set
|
|
2058
|
+
*/
|
|
2002
2059
|
"unicorn/prefer-set-has": "error",
|
|
2003
2060
|
"unicorn/prefer-set-size": "error",
|
|
2061
|
+
/**
|
|
2062
|
+
* @pg Module
|
|
2063
|
+
*/
|
|
2004
2064
|
"unicorn/require-module-specifiers": "off",
|
|
2005
2065
|
"unicorn/require-module-attributes": "error",
|
|
2006
2066
|
...options.overrides
|
|
@@ -2149,6 +2209,10 @@ const configPrettier = (options = {}) => {
|
|
|
2149
2209
|
"vue/space-infix-ops": "off",
|
|
2150
2210
|
"vue/space-unary-ops": "off",
|
|
2151
2211
|
"vue/template-curly-spacing": "off",
|
|
2212
|
+
/**
|
|
2213
|
+
* @pg
|
|
2214
|
+
* @see {@link https://github.com/prettier/eslint-plugin-prettier/blob/cd48a275f130e515f23cebdf7c6cb588b041cd64/eslint-plugin-prettier.js#L101-L103}
|
|
2215
|
+
*/
|
|
2152
2216
|
"arrow-body-style": "off",
|
|
2153
2217
|
"prefer-arrow-callback": "off",
|
|
2154
2218
|
"prettier/prettier": options.severity || "warn",
|
|
@@ -3004,10 +3068,9 @@ const configPerfectionist = (options = {}) => {
|
|
|
3004
3068
|
*/
|
|
3005
3069
|
const configUnusedImports = async (options = {}) => {
|
|
3006
3070
|
await ensurePackages(["eslint-plugin-unused-imports"]);
|
|
3007
|
-
const pluginUnusedImports = await interopDefault(import("eslint-plugin-unused-imports"));
|
|
3008
3071
|
return [{
|
|
3009
3072
|
name: "ntnyq/unused-imports",
|
|
3010
|
-
plugins: { "unused-imports":
|
|
3073
|
+
plugins: { "unused-imports": await interopDefault(import("eslint-plugin-unused-imports")) },
|
|
3011
3074
|
rules: {
|
|
3012
3075
|
"@typescript-eslint/no-unused-vars": "off",
|
|
3013
3076
|
"unused-imports/no-unused-imports": "error",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.0
|
|
4
|
+
"version": "6.1.0",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@eslint/js": "^10.0.1",
|
|
88
88
|
"@eslint/markdown": "^8.0.1",
|
|
89
89
|
"@unocss/eslint-plugin": "^66.6.8",
|
|
90
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
90
|
+
"@vitest/eslint-plugin": "^1.6.16",
|
|
91
91
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
92
92
|
"eslint-flat-config-utils": "3.0.2",
|
|
93
93
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
@@ -104,46 +104,46 @@
|
|
|
104
104
|
"eslint-plugin-n": "^17.24.0",
|
|
105
105
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
106
106
|
"eslint-plugin-ntnyq": "^0.14.0",
|
|
107
|
-
"eslint-plugin-oxfmt": "^0.
|
|
108
|
-
"eslint-plugin-perfectionist": "^5.
|
|
107
|
+
"eslint-plugin-oxfmt": "^0.4.0",
|
|
108
|
+
"eslint-plugin-perfectionist": "^5.9.0",
|
|
109
109
|
"eslint-plugin-pinia": "^0.4.2",
|
|
110
110
|
"eslint-plugin-prettier": "^5.5.5",
|
|
111
111
|
"eslint-plugin-regexp": "^3.1.0",
|
|
112
112
|
"eslint-plugin-svgo": "^0.12.0",
|
|
113
113
|
"eslint-plugin-toml": "^1.3.1",
|
|
114
114
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
115
|
-
"eslint-plugin-vue": "^10.
|
|
115
|
+
"eslint-plugin-vue": "^10.9.0",
|
|
116
116
|
"eslint-plugin-yml": "^3.3.1",
|
|
117
117
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
118
|
-
"globals": "^17.
|
|
118
|
+
"globals": "^17.5.0",
|
|
119
119
|
"jsonc-eslint-parser": "^3.1.0",
|
|
120
120
|
"local-pkg": "^1.1.2",
|
|
121
121
|
"toml-eslint-parser": "^1.0.3",
|
|
122
|
-
"typescript-eslint": "^8.
|
|
122
|
+
"typescript-eslint": "^8.59.0",
|
|
123
123
|
"vue-eslint-parser": "^10.4.0",
|
|
124
124
|
"yaml-eslint-parser": "^2.0.0"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@types/node": "^25.
|
|
128
|
-
"@typescript-eslint/types": "^8.
|
|
129
|
-
"@typescript-eslint/utils": "^8.
|
|
130
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
127
|
+
"@types/node": "^25.6.0",
|
|
128
|
+
"@typescript-eslint/types": "^8.59.0",
|
|
129
|
+
"@typescript-eslint/utils": "^8.59.0",
|
|
130
|
+
"@typescript/native-preview": "^7.0.0-dev.20260422.1",
|
|
131
131
|
"bumpp": "^11.0.1",
|
|
132
132
|
"consola": "^3.4.2",
|
|
133
|
-
"eslint": "^10.2.
|
|
133
|
+
"eslint": "^10.2.1",
|
|
134
134
|
"eslint-typegen": "^2.3.1",
|
|
135
135
|
"husky": "^9.1.7",
|
|
136
136
|
"jiti": "^2.6.1",
|
|
137
137
|
"nano-staged": "^1.0.2",
|
|
138
138
|
"npm-run-all2": "^8.0.4",
|
|
139
|
-
"oxfmt": "^0.
|
|
140
|
-
"prettier": "^3.8.
|
|
139
|
+
"oxfmt": "^0.46.0",
|
|
140
|
+
"prettier": "^3.8.3",
|
|
141
141
|
"tinyglobby": "^0.2.16",
|
|
142
|
-
"tsdown": "^0.21.
|
|
142
|
+
"tsdown": "^0.21.10",
|
|
143
143
|
"tsx": "^4.21.0",
|
|
144
|
-
"typescript": "^6.0.
|
|
144
|
+
"typescript": "^6.0.3",
|
|
145
145
|
"uncase": "^0.2.0",
|
|
146
|
-
"vitest": "^4.1.
|
|
146
|
+
"vitest": "^4.1.5"
|
|
147
147
|
},
|
|
148
148
|
"engines": {
|
|
149
149
|
"node": "^20.19.0 || ^22.13.0 || >=24"
|