@vinicunca/eslint-config 3.28.0 → 3.30.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.ts → index-UNvaZool.d.ts} +84 -3
- package/dist/index.js +16 -16
- package/package.json +11 -11
|
@@ -962,6 +962,11 @@ interface RuleOptions {
|
|
|
962
962
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header
|
|
963
963
|
*/
|
|
964
964
|
'jsdoc/require-property-type'?: Linter.RuleEntry<[]>;
|
|
965
|
+
/**
|
|
966
|
+
* Requires that Promise rejections are documented with `@rejects` tags.
|
|
967
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-rejects.md#repos-sticky-header
|
|
968
|
+
*/
|
|
969
|
+
'jsdoc/require-rejects'?: Linter.RuleEntry<JsdocRequireRejects>;
|
|
965
970
|
/**
|
|
966
971
|
* Requires that returns are documented with `@returns`.
|
|
967
972
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header
|
|
@@ -5346,6 +5351,11 @@ interface RuleOptions {
|
|
|
5346
5351
|
* @see https://eslint.style/rules/eol-last
|
|
5347
5352
|
*/
|
|
5348
5353
|
'style/eol-last'?: Linter.RuleEntry<StyleEolLast>;
|
|
5354
|
+
/**
|
|
5355
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
5356
|
+
* @see https://eslint.style/rules/list-style
|
|
5357
|
+
*/
|
|
5358
|
+
'style/exp-list-style'?: Linter.RuleEntry<StyleExpListStyle>;
|
|
5349
5359
|
/**
|
|
5350
5360
|
* Enforce line breaks between arguments of a function call
|
|
5351
5361
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -6170,7 +6180,7 @@ interface RuleOptions {
|
|
|
6170
6180
|
*/
|
|
6171
6181
|
'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>;
|
|
6172
6182
|
/**
|
|
6173
|
-
* require
|
|
6183
|
+
* require test file pattern
|
|
6174
6184
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
6175
6185
|
*/
|
|
6176
6186
|
'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>;
|
|
@@ -7104,6 +7114,11 @@ interface RuleOptions {
|
|
|
7104
7114
|
* @see https://typescript-eslint.io/rules/no-unused-expressions
|
|
7105
7115
|
*/
|
|
7106
7116
|
'ts/no-unused-expressions'?: Linter.RuleEntry<TsNoUnusedExpressions>;
|
|
7117
|
+
/**
|
|
7118
|
+
* Disallow unused private class members
|
|
7119
|
+
* @see https://typescript-eslint.io/rules/no-unused-private-class-members
|
|
7120
|
+
*/
|
|
7121
|
+
'ts/no-unused-private-class-members'?: Linter.RuleEntry<[]>;
|
|
7107
7122
|
/**
|
|
7108
7123
|
* Disallow unused variables
|
|
7109
7124
|
* @see https://typescript-eslint.io/rules/no-unused-vars
|
|
@@ -8536,6 +8551,11 @@ interface RuleOptions {
|
|
|
8536
8551
|
* @see https://eslint.vuejs.org/rules/no-duplicate-attributes.html
|
|
8537
8552
|
*/
|
|
8538
8553
|
'vue/no-duplicate-attributes'?: Linter.RuleEntry<VueNoDuplicateAttributes>;
|
|
8554
|
+
/**
|
|
8555
|
+
* disallow duplication of class names in class attributes
|
|
8556
|
+
* @see https://eslint.vuejs.org/rules/no-duplicate-class-names.html
|
|
8557
|
+
*/
|
|
8558
|
+
'vue/no-duplicate-class-names'?: Linter.RuleEntry<[]>;
|
|
8539
8559
|
/**
|
|
8540
8560
|
* disallow the `<template>` `<script>` `<style>` block to be empty
|
|
8541
8561
|
* @see https://eslint.vuejs.org/rules/no-empty-component-block.html
|
|
@@ -9888,6 +9908,7 @@ type JsdocCheckExamples = [] | [{
|
|
|
9888
9908
|
}];
|
|
9889
9909
|
// ----- jsdoc/check-indentation -----
|
|
9890
9910
|
type JsdocCheckIndentation = [] | [{
|
|
9911
|
+
allowIndentedSections?: boolean;
|
|
9891
9912
|
excludeTags?: string[];
|
|
9892
9913
|
}];
|
|
9893
9914
|
// ----- jsdoc/check-line-alignment -----
|
|
@@ -10234,6 +10255,14 @@ type JsdocRequireParamType = [] | [{
|
|
|
10234
10255
|
defaultDestructuredRootType?: string;
|
|
10235
10256
|
setDefaultDestructuredRootType?: boolean;
|
|
10236
10257
|
}];
|
|
10258
|
+
// ----- jsdoc/require-rejects -----
|
|
10259
|
+
type JsdocRequireRejects = [] | [{
|
|
10260
|
+
contexts?: (string | {
|
|
10261
|
+
comment?: string;
|
|
10262
|
+
context?: string;
|
|
10263
|
+
})[];
|
|
10264
|
+
exemptedBy?: string[];
|
|
10265
|
+
}];
|
|
10237
10266
|
// ----- jsdoc/require-returns -----
|
|
10238
10267
|
type JsdocRequireReturns = [] | [{
|
|
10239
10268
|
checkConstructors?: boolean;
|
|
@@ -10324,6 +10353,9 @@ type JsdocSortTags = [] | [{
|
|
|
10324
10353
|
linesBetween?: number;
|
|
10325
10354
|
reportIntraTagGroupSpacing?: boolean;
|
|
10326
10355
|
reportTagGroupSpacing?: boolean;
|
|
10356
|
+
tagExceptions?: {
|
|
10357
|
+
[k: string]: number;
|
|
10358
|
+
};
|
|
10327
10359
|
tagSequence?: {
|
|
10328
10360
|
tags?: string[];
|
|
10329
10361
|
}[];
|
|
@@ -14352,6 +14384,50 @@ type StyleCurlyNewline = [] | [(("always" | "never") | {
|
|
|
14352
14384
|
type StyleDotLocation = [] | [("object" | "property")];
|
|
14353
14385
|
// ----- style/eol-last -----
|
|
14354
14386
|
type StyleEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
14387
|
+
// ----- style/exp-list-style -----
|
|
14388
|
+
type StyleExpListStyle = [] | [{
|
|
14389
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
14390
|
+
multiLine?: _StyleExpListStyle_MultiLineConfig;
|
|
14391
|
+
overrides?: {
|
|
14392
|
+
"[]"?: _StyleExpListStyle_BaseConfig;
|
|
14393
|
+
"{}"?: _StyleExpListStyle_BaseConfig;
|
|
14394
|
+
"<>"?: _StyleExpListStyle_BaseConfig;
|
|
14395
|
+
"()"?: _StyleExpListStyle_BaseConfig;
|
|
14396
|
+
ArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
14397
|
+
ArrayPattern?: _StyleExpListStyle_BaseConfig;
|
|
14398
|
+
ArrowFunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
14399
|
+
CallExpression?: _StyleExpListStyle_BaseConfig;
|
|
14400
|
+
ExportNamedDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
14401
|
+
FunctionDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
14402
|
+
FunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
14403
|
+
ImportDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
14404
|
+
ImportAttributes?: _StyleExpListStyle_BaseConfig;
|
|
14405
|
+
NewExpression?: _StyleExpListStyle_BaseConfig;
|
|
14406
|
+
ObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
14407
|
+
ObjectPattern?: _StyleExpListStyle_BaseConfig;
|
|
14408
|
+
TSDeclareFunction?: _StyleExpListStyle_BaseConfig;
|
|
14409
|
+
TSFunctionType?: _StyleExpListStyle_BaseConfig;
|
|
14410
|
+
TSInterfaceBody?: _StyleExpListStyle_BaseConfig;
|
|
14411
|
+
TSEnumBody?: _StyleExpListStyle_BaseConfig;
|
|
14412
|
+
TSTupleType?: _StyleExpListStyle_BaseConfig;
|
|
14413
|
+
TSTypeLiteral?: _StyleExpListStyle_BaseConfig;
|
|
14414
|
+
TSTypeParameterDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
14415
|
+
TSTypeParameterInstantiation?: _StyleExpListStyle_BaseConfig;
|
|
14416
|
+
JSONArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
14417
|
+
JSONObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
14418
|
+
};
|
|
14419
|
+
}];
|
|
14420
|
+
interface _StyleExpListStyle_SingleLineConfig {
|
|
14421
|
+
spacing?: ("always" | "never");
|
|
14422
|
+
maxItems?: number;
|
|
14423
|
+
}
|
|
14424
|
+
interface _StyleExpListStyle_MultiLineConfig {
|
|
14425
|
+
minItems?: number;
|
|
14426
|
+
}
|
|
14427
|
+
interface _StyleExpListStyle_BaseConfig {
|
|
14428
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
14429
|
+
multiline?: _StyleExpListStyle_MultiLineConfig;
|
|
14430
|
+
}
|
|
14355
14431
|
// ----- style/function-call-argument-newline -----
|
|
14356
14432
|
type StyleFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
14357
14433
|
// ----- style/function-call-spacing -----
|
|
@@ -14421,7 +14497,11 @@ type StyleIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
14421
14497
|
ObjectExpression?: (number | ("first" | "off"));
|
|
14422
14498
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
14423
14499
|
flatTernaryExpressions?: boolean;
|
|
14424
|
-
offsetTernaryExpressions?: boolean
|
|
14500
|
+
offsetTernaryExpressions?: (boolean | {
|
|
14501
|
+
CallExpression?: boolean;
|
|
14502
|
+
AwaitExpression?: boolean;
|
|
14503
|
+
NewExpression?: boolean;
|
|
14504
|
+
});
|
|
14425
14505
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
14426
14506
|
ignoredNodes?: string[];
|
|
14427
14507
|
ignoreComments?: boolean;
|
|
@@ -15222,6 +15302,7 @@ type StyleObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never
|
|
|
15222
15302
|
TSInterfaceBody?: ("always" | "never");
|
|
15223
15303
|
TSEnumBody?: ("always" | "never");
|
|
15224
15304
|
};
|
|
15305
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
15225
15306
|
}];
|
|
15226
15307
|
// ----- style/object-property-newline -----
|
|
15227
15308
|
type StyleObjectPropertyNewline = [] | [{
|
|
@@ -18909,7 +18990,7 @@ type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
|
18909
18990
|
* @returns
|
|
18910
18991
|
* The merged ESLint configurations.
|
|
18911
18992
|
*/
|
|
18912
|
-
declare function vinicuncaESLint(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Array<Awaitable<Array<Linter.Config> | Array<TypedFlatConfigItem> | FlatConfigComposer<any, any> | TypedFlatConfigItem>>): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
18993
|
+
declare function vinicuncaESLint(options?: OptionsConfig & Omit<TypedFlatConfigItem, 'files'>, ...userConfigs: Array<Awaitable<Array<Linter.Config> | Array<TypedFlatConfigItem> | FlatConfigComposer<any, any> | TypedFlatConfigItem>>): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
18913
18994
|
//#endregion
|
|
18914
18995
|
//#region src/configs/astro.d.ts
|
|
18915
18996
|
declare function astro(options?: OptionsFiles & OptionsOverrides & OptionsStylistic): Promise<Array<TypedFlatConfigItem>>;
|
package/dist/index.js
CHANGED
|
@@ -15,23 +15,23 @@ import globals from "globals";
|
|
|
15
15
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
16
16
|
import { configs } from "eslint-plugin-regexp";
|
|
17
17
|
|
|
18
|
-
//#region ../node_modules/.pnpm/@vinicunca+perkakas@1.
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
let e$2 = Object.getPrototypeOf(o);
|
|
22
|
-
return e$2 === null || e$2 === Object.prototype;
|
|
18
|
+
//#region ../node_modules/.pnpm/@vinicunca+perkakas@1.8.0/node_modules/@vinicunca/perkakas/dist/is-boolean-CZKz4ij3.js
|
|
19
|
+
function e(e$3) {
|
|
20
|
+
return typeof e$3 == `boolean`;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
//#endregion
|
|
26
|
-
//#region ../node_modules/.pnpm/@vinicunca+perkakas@1.
|
|
27
|
-
function e$
|
|
28
|
-
return typeof
|
|
24
|
+
//#region ../node_modules/.pnpm/@vinicunca+perkakas@1.8.0/node_modules/@vinicunca/perkakas/dist/is-number-DRJ5I-tT.js
|
|
25
|
+
function e$2(e$3) {
|
|
26
|
+
return typeof e$3 == `number` && !Number.isNaN(e$3);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
//#endregion
|
|
32
|
-
//#region ../node_modules/.pnpm/@vinicunca+perkakas@1.
|
|
33
|
-
function e(
|
|
34
|
-
|
|
30
|
+
//#region ../node_modules/.pnpm/@vinicunca+perkakas@1.8.0/node_modules/@vinicunca/perkakas/dist/is-plain-object-Cnx_x0Ei.js
|
|
31
|
+
function e$1(e$3) {
|
|
32
|
+
if (typeof e$3 != `object` || !e$3) return !1;
|
|
33
|
+
let t = Object.getPrototypeOf(e$3);
|
|
34
|
+
return t === null || t === Object.prototype;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
//#endregion
|
|
@@ -409,7 +409,7 @@ async function formatters(options = {}, stylistic$1 = {}) {
|
|
|
409
409
|
endOfLine: "auto",
|
|
410
410
|
semi,
|
|
411
411
|
singleQuote: quotes === "single",
|
|
412
|
-
tabWidth: e$
|
|
412
|
+
tabWidth: e$2(indent) ? indent : 2,
|
|
413
413
|
trailingComma: "all",
|
|
414
414
|
useTabs: indent === "tab"
|
|
415
415
|
}, options.prettierOptions || {});
|
|
@@ -420,7 +420,7 @@ async function formatters(options = {}, stylistic$1 = {}) {
|
|
|
420
420
|
xmlWhitespaceSensitivity: "ignore"
|
|
421
421
|
};
|
|
422
422
|
const dprintOptions = Object.assign({
|
|
423
|
-
indentWidth: e$
|
|
423
|
+
indentWidth: e$2(indent) ? indent : 2,
|
|
424
424
|
quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
|
|
425
425
|
useTabs: indent === "tab"
|
|
426
426
|
}, options.dprintOptions || {});
|
|
@@ -2235,15 +2235,15 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
2235
2235
|
}
|
|
2236
2236
|
let stylisticOptions = {};
|
|
2237
2237
|
if (options.stylistic === false) stylisticOptions = false;
|
|
2238
|
-
else if (
|
|
2238
|
+
else if (e$1(options.stylistic)) stylisticOptions = options.stylistic;
|
|
2239
2239
|
else stylisticOptions = {};
|
|
2240
2240
|
if (stylisticOptions && !("jsx" in stylisticOptions)) stylisticOptions.jsx = enableJsx;
|
|
2241
2241
|
const configs$1 = [];
|
|
2242
|
-
if (enableGitignore) if (!e(enableGitignore)) configs$1.push(interopDefault(import("eslint-config-flat-gitignore")).then((r
|
|
2242
|
+
if (enableGitignore) if (!e(enableGitignore)) configs$1.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
|
|
2243
2243
|
name: "vinicunca/gitignore",
|
|
2244
2244
|
...enableGitignore
|
|
2245
2245
|
})]));
|
|
2246
|
-
else configs$1.push(interopDefault(import("eslint-config-flat-gitignore")).then((r
|
|
2246
|
+
else configs$1.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
|
|
2247
2247
|
name: "vinicunca/gitignore",
|
|
2248
2248
|
strict: false
|
|
2249
2249
|
})]));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinicunca/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.30.0",
|
|
5
5
|
"description": "Vinicunca ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "praburangki",
|
|
@@ -109,12 +109,12 @@
|
|
|
109
109
|
"@antfu/install-pkg": "^1.1.0",
|
|
110
110
|
"@clack/prompts": "^0.11.0",
|
|
111
111
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
112
|
-
"@eslint/markdown": "^7.
|
|
113
|
-
"@stylistic/eslint-plugin": "^5.
|
|
114
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
115
|
-
"@typescript-eslint/parser": "^8.
|
|
116
|
-
"@unocss/eslint-plugin": "^66.5.
|
|
117
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
112
|
+
"@eslint/markdown": "^7.5.1",
|
|
113
|
+
"@stylistic/eslint-plugin": "^5.6.1",
|
|
114
|
+
"@typescript-eslint/eslint-plugin": "^8.48.1",
|
|
115
|
+
"@typescript-eslint/parser": "^8.48.1",
|
|
116
|
+
"@unocss/eslint-plugin": "^66.5.10",
|
|
117
|
+
"@vitest/eslint-plugin": "^1.3.20",
|
|
118
118
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
119
119
|
"eslint-flat-config-utils": "^2.1.4",
|
|
120
120
|
"eslint-merge-processors": "^2.0.0",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"eslint-plugin-command": "^3.3.1",
|
|
123
123
|
"eslint-plugin-format": "^1.0.2",
|
|
124
124
|
"eslint-plugin-import-lite": "^0.3.0",
|
|
125
|
-
"eslint-plugin-jsdoc": "^61.1
|
|
125
|
+
"eslint-plugin-jsdoc": "^61.4.1",
|
|
126
126
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
127
127
|
"eslint-plugin-n": "^17.23.1",
|
|
128
128
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
@@ -133,15 +133,15 @@
|
|
|
133
133
|
"eslint-plugin-toml": "^0.12.0",
|
|
134
134
|
"eslint-plugin-unicorn": "^61.0.2",
|
|
135
135
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
136
|
-
"eslint-plugin-vue": "^10.
|
|
136
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
137
137
|
"eslint-plugin-yml": "^1.19.0",
|
|
138
138
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
139
|
-
"globals": "^16.
|
|
139
|
+
"globals": "^16.5.0",
|
|
140
140
|
"jsonc-eslint-parser": "^2.4.1",
|
|
141
141
|
"local-pkg": "^1.1.2",
|
|
142
142
|
"toml-eslint-parser": "^0.10.0",
|
|
143
143
|
"vue-eslint-parser": "^10.2.0",
|
|
144
|
-
"yaml-eslint-parser": "^1.3.
|
|
144
|
+
"yaml-eslint-parser": "^1.3.1"
|
|
145
145
|
},
|
|
146
146
|
"scripts": {
|
|
147
147
|
"lint": "eslint --fix .",
|