@vinicunca/eslint-config 2.1.3 → 2.1.6
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.cjs +56 -1000
- package/dist/index.d.cts +21 -20
- package/dist/index.d.ts +21 -20
- package/dist/index.js +56 -1000
- package/package.json +29 -30
package/dist/index.d.cts
CHANGED
|
@@ -7,6 +7,7 @@ import { ParserOptions } from '@typescript-eslint/parser';
|
|
|
7
7
|
import { Rules as Rules$1 } from '@vinicunca/eslint-plugin-vinicunca';
|
|
8
8
|
export { default as pluginVinicunca } from '@vinicunca/eslint-plugin-vinicunca';
|
|
9
9
|
import { Linter } from 'eslint';
|
|
10
|
+
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
10
11
|
import { Options } from 'eslint-processor-vue-blocks';
|
|
11
12
|
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
12
13
|
import * as eslintPluginI from 'eslint-plugin-i';
|
|
@@ -141,7 +142,7 @@ interface OptionsFiles {
|
|
|
141
142
|
/**
|
|
142
143
|
* Override the `files` option to provide custom globs.
|
|
143
144
|
*/
|
|
144
|
-
files?: string
|
|
145
|
+
files?: Array<string>;
|
|
145
146
|
}
|
|
146
147
|
interface OptionsVue extends OptionsOverrides {
|
|
147
148
|
/**
|
|
@@ -204,14 +205,14 @@ interface OptionsComponentExts {
|
|
|
204
205
|
* @example ['vue']
|
|
205
206
|
* @default []
|
|
206
207
|
*/
|
|
207
|
-
componentExts?: string
|
|
208
|
+
componentExts?: Array<string>;
|
|
208
209
|
}
|
|
209
210
|
interface OptionsTypeScriptParserOptions {
|
|
210
211
|
/**
|
|
211
212
|
* Glob patterns for files that should be type aware.
|
|
212
213
|
* @default ['**\/*.{ts,tsx}']
|
|
213
214
|
*/
|
|
214
|
-
filesTypeAware?: string
|
|
215
|
+
filesTypeAware?: Array<string>;
|
|
215
216
|
/**
|
|
216
217
|
* Additional parser options for TypeScript.
|
|
217
218
|
*/
|
|
@@ -222,7 +223,7 @@ interface OptionsTypeScriptWithTypes {
|
|
|
222
223
|
* When this options is provided, type aware rules will be enabled.
|
|
223
224
|
* @see https://typescript-eslint.io/linting/typed-linting/
|
|
224
225
|
*/
|
|
225
|
-
tsconfigPath?: string | string
|
|
226
|
+
tsconfigPath?: Array<string> | string;
|
|
226
227
|
}
|
|
227
228
|
interface OptionsHasTypeScript {
|
|
228
229
|
typescript?: boolean;
|
|
@@ -250,11 +251,6 @@ interface OptionsUnoCSS extends OptionsOverrides {
|
|
|
250
251
|
*/
|
|
251
252
|
strict?: boolean;
|
|
252
253
|
}
|
|
253
|
-
interface OptionsIgnores {
|
|
254
|
-
enableGitignore?: boolean;
|
|
255
|
-
items?: string[];
|
|
256
|
-
replace?: boolean;
|
|
257
|
-
}
|
|
258
254
|
interface OptionsConfig extends OptionsComponentExts {
|
|
259
255
|
/**
|
|
260
256
|
* Use external formatters to format files.
|
|
@@ -268,9 +264,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
268
264
|
*/
|
|
269
265
|
formatters?: OptionsFormatters | boolean;
|
|
270
266
|
/**
|
|
271
|
-
*
|
|
267
|
+
* Enable gitignore support.
|
|
268
|
+
*
|
|
269
|
+
* Passing an object to configure the options.
|
|
270
|
+
*
|
|
271
|
+
* @see https://github.com/antfu/eslint-config-flat-gitignore
|
|
272
|
+
* @default true
|
|
272
273
|
*/
|
|
273
|
-
|
|
274
|
+
gitignore?: FlatGitignoreOptions | boolean;
|
|
274
275
|
/**
|
|
275
276
|
* Control to disable some rules in editors.
|
|
276
277
|
* @default auto-detect based on the process.env
|
|
@@ -314,7 +315,7 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
314
315
|
*
|
|
315
316
|
* @default true
|
|
316
317
|
*/
|
|
317
|
-
stylistic?: StylisticConfig | boolean;
|
|
318
|
+
stylistic?: (StylisticConfig & OptionsOverrides) | boolean;
|
|
318
319
|
/**
|
|
319
320
|
* Enable test support.
|
|
320
321
|
*
|
|
@@ -352,21 +353,21 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
352
353
|
yaml?: OptionsOverrides | boolean;
|
|
353
354
|
}
|
|
354
355
|
|
|
355
|
-
declare function vinicuncaESLint(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem
|
|
356
|
+
declare function vinicuncaESLint(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Array<Awaitable<Array<UserConfigItem> | UserConfigItem>>): Promise<Array<UserConfigItem>>;
|
|
356
357
|
|
|
357
358
|
declare function comments(): Promise<FlatConfigItem[]>;
|
|
358
359
|
|
|
359
|
-
declare function ignores(
|
|
360
|
+
declare function ignores(): Promise<Array<FlatConfigItem>>;
|
|
360
361
|
|
|
361
362
|
declare function imports(): Promise<FlatConfigItem[]>;
|
|
362
363
|
|
|
363
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem
|
|
364
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<Array<FlatConfigItem>>;
|
|
364
365
|
|
|
365
366
|
declare function jsdoc(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
366
367
|
|
|
367
368
|
declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
368
369
|
|
|
369
|
-
declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides): Promise<FlatConfigItem
|
|
370
|
+
declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides): Promise<Array<FlatConfigItem>>;
|
|
370
371
|
|
|
371
372
|
declare function node(): Promise<FlatConfigItem[]>;
|
|
372
373
|
|
|
@@ -396,14 +397,14 @@ declare function unicorn(): Promise<FlatConfigItem[]>;
|
|
|
396
397
|
|
|
397
398
|
declare function unocss(options?: OptionsUnoCSS): Promise<FlatConfigItem[]>;
|
|
398
399
|
|
|
399
|
-
declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem
|
|
400
|
+
declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<Array<FlatConfigItem>>;
|
|
400
401
|
|
|
401
402
|
declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem[]>;
|
|
402
403
|
|
|
403
404
|
/**
|
|
404
405
|
* Combine array and non-array configs into a single array.
|
|
405
406
|
*/
|
|
406
|
-
declare function combineConfigs(...configs: Awaitable<UserConfigItem | UserConfigItem
|
|
407
|
+
declare function combineConfigs(...configs: Array<Awaitable<Array<UserConfigItem> | UserConfigItem>>): Promise<Array<UserConfigItem>>;
|
|
407
408
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
408
409
|
[k: string]: any;
|
|
409
410
|
};
|
|
@@ -435,7 +436,7 @@ declare const parserPlain: {
|
|
|
435
436
|
};
|
|
436
437
|
};
|
|
437
438
|
};
|
|
438
|
-
declare function toArray<T>(value: T | T
|
|
439
|
+
declare function toArray<T>(value: Array<T> | T): Array<T>;
|
|
439
440
|
|
|
440
441
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
441
442
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -461,4 +462,4 @@ declare const GLOB_TESTS: string[];
|
|
|
461
462
|
declare const GLOB_ALL_SRC: string[];
|
|
462
463
|
declare const GLOB_EXCLUDE: string[];
|
|
463
464
|
|
|
464
|
-
export { type Awaitable, type FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type
|
|
465
|
+
export { type Awaitable, type FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnoCSS, type OptionsVue, type Rules, STYLISTIC_CONFIG_DEFAULTS, type StylisticConfig, type UserConfigItem, type WrapRuleConfig, combineConfigs, comments, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, parserPlain, react, renameRules, sortPackageJson, sortTsconfig, stylistic, test, toArray, typescript, unicorn, unocss, vinicuncaESLint, vue, yaml };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ParserOptions } from '@typescript-eslint/parser';
|
|
|
7
7
|
import { Rules as Rules$1 } from '@vinicunca/eslint-plugin-vinicunca';
|
|
8
8
|
export { default as pluginVinicunca } from '@vinicunca/eslint-plugin-vinicunca';
|
|
9
9
|
import { Linter } from 'eslint';
|
|
10
|
+
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
10
11
|
import { Options } from 'eslint-processor-vue-blocks';
|
|
11
12
|
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
12
13
|
import * as eslintPluginI from 'eslint-plugin-i';
|
|
@@ -141,7 +142,7 @@ interface OptionsFiles {
|
|
|
141
142
|
/**
|
|
142
143
|
* Override the `files` option to provide custom globs.
|
|
143
144
|
*/
|
|
144
|
-
files?: string
|
|
145
|
+
files?: Array<string>;
|
|
145
146
|
}
|
|
146
147
|
interface OptionsVue extends OptionsOverrides {
|
|
147
148
|
/**
|
|
@@ -204,14 +205,14 @@ interface OptionsComponentExts {
|
|
|
204
205
|
* @example ['vue']
|
|
205
206
|
* @default []
|
|
206
207
|
*/
|
|
207
|
-
componentExts?: string
|
|
208
|
+
componentExts?: Array<string>;
|
|
208
209
|
}
|
|
209
210
|
interface OptionsTypeScriptParserOptions {
|
|
210
211
|
/**
|
|
211
212
|
* Glob patterns for files that should be type aware.
|
|
212
213
|
* @default ['**\/*.{ts,tsx}']
|
|
213
214
|
*/
|
|
214
|
-
filesTypeAware?: string
|
|
215
|
+
filesTypeAware?: Array<string>;
|
|
215
216
|
/**
|
|
216
217
|
* Additional parser options for TypeScript.
|
|
217
218
|
*/
|
|
@@ -222,7 +223,7 @@ interface OptionsTypeScriptWithTypes {
|
|
|
222
223
|
* When this options is provided, type aware rules will be enabled.
|
|
223
224
|
* @see https://typescript-eslint.io/linting/typed-linting/
|
|
224
225
|
*/
|
|
225
|
-
tsconfigPath?: string | string
|
|
226
|
+
tsconfigPath?: Array<string> | string;
|
|
226
227
|
}
|
|
227
228
|
interface OptionsHasTypeScript {
|
|
228
229
|
typescript?: boolean;
|
|
@@ -250,11 +251,6 @@ interface OptionsUnoCSS extends OptionsOverrides {
|
|
|
250
251
|
*/
|
|
251
252
|
strict?: boolean;
|
|
252
253
|
}
|
|
253
|
-
interface OptionsIgnores {
|
|
254
|
-
enableGitignore?: boolean;
|
|
255
|
-
items?: string[];
|
|
256
|
-
replace?: boolean;
|
|
257
|
-
}
|
|
258
254
|
interface OptionsConfig extends OptionsComponentExts {
|
|
259
255
|
/**
|
|
260
256
|
* Use external formatters to format files.
|
|
@@ -268,9 +264,14 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
268
264
|
*/
|
|
269
265
|
formatters?: OptionsFormatters | boolean;
|
|
270
266
|
/**
|
|
271
|
-
*
|
|
267
|
+
* Enable gitignore support.
|
|
268
|
+
*
|
|
269
|
+
* Passing an object to configure the options.
|
|
270
|
+
*
|
|
271
|
+
* @see https://github.com/antfu/eslint-config-flat-gitignore
|
|
272
|
+
* @default true
|
|
272
273
|
*/
|
|
273
|
-
|
|
274
|
+
gitignore?: FlatGitignoreOptions | boolean;
|
|
274
275
|
/**
|
|
275
276
|
* Control to disable some rules in editors.
|
|
276
277
|
* @default auto-detect based on the process.env
|
|
@@ -314,7 +315,7 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
314
315
|
*
|
|
315
316
|
* @default true
|
|
316
317
|
*/
|
|
317
|
-
stylistic?: StylisticConfig | boolean;
|
|
318
|
+
stylistic?: (StylisticConfig & OptionsOverrides) | boolean;
|
|
318
319
|
/**
|
|
319
320
|
* Enable test support.
|
|
320
321
|
*
|
|
@@ -352,21 +353,21 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
352
353
|
yaml?: OptionsOverrides | boolean;
|
|
353
354
|
}
|
|
354
355
|
|
|
355
|
-
declare function vinicuncaESLint(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem
|
|
356
|
+
declare function vinicuncaESLint(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Array<Awaitable<Array<UserConfigItem> | UserConfigItem>>): Promise<Array<UserConfigItem>>;
|
|
356
357
|
|
|
357
358
|
declare function comments(): Promise<FlatConfigItem[]>;
|
|
358
359
|
|
|
359
|
-
declare function ignores(
|
|
360
|
+
declare function ignores(): Promise<Array<FlatConfigItem>>;
|
|
360
361
|
|
|
361
362
|
declare function imports(): Promise<FlatConfigItem[]>;
|
|
362
363
|
|
|
363
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem
|
|
364
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<Array<FlatConfigItem>>;
|
|
364
365
|
|
|
365
366
|
declare function jsdoc(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
366
367
|
|
|
367
368
|
declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
368
369
|
|
|
369
|
-
declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides): Promise<FlatConfigItem
|
|
370
|
+
declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides): Promise<Array<FlatConfigItem>>;
|
|
370
371
|
|
|
371
372
|
declare function node(): Promise<FlatConfigItem[]>;
|
|
372
373
|
|
|
@@ -396,14 +397,14 @@ declare function unicorn(): Promise<FlatConfigItem[]>;
|
|
|
396
397
|
|
|
397
398
|
declare function unocss(options?: OptionsUnoCSS): Promise<FlatConfigItem[]>;
|
|
398
399
|
|
|
399
|
-
declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem
|
|
400
|
+
declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<Array<FlatConfigItem>>;
|
|
400
401
|
|
|
401
402
|
declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<FlatConfigItem[]>;
|
|
402
403
|
|
|
403
404
|
/**
|
|
404
405
|
* Combine array and non-array configs into a single array.
|
|
405
406
|
*/
|
|
406
|
-
declare function combineConfigs(...configs: Awaitable<UserConfigItem | UserConfigItem
|
|
407
|
+
declare function combineConfigs(...configs: Array<Awaitable<Array<UserConfigItem> | UserConfigItem>>): Promise<Array<UserConfigItem>>;
|
|
407
408
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
408
409
|
[k: string]: any;
|
|
409
410
|
};
|
|
@@ -435,7 +436,7 @@ declare const parserPlain: {
|
|
|
435
436
|
};
|
|
436
437
|
};
|
|
437
438
|
};
|
|
438
|
-
declare function toArray<T>(value: T | T
|
|
439
|
+
declare function toArray<T>(value: Array<T> | T): Array<T>;
|
|
439
440
|
|
|
440
441
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
441
442
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -461,4 +462,4 @@ declare const GLOB_TESTS: string[];
|
|
|
461
462
|
declare const GLOB_ALL_SRC: string[];
|
|
462
463
|
declare const GLOB_EXCLUDE: string[];
|
|
463
464
|
|
|
464
|
-
export { type Awaitable, type FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type
|
|
465
|
+
export { type Awaitable, type FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnoCSS, type OptionsVue, type Rules, STYLISTIC_CONFIG_DEFAULTS, type StylisticConfig, type UserConfigItem, type WrapRuleConfig, combineConfigs, comments, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, parserPlain, react, renameRules, sortPackageJson, sortTsconfig, stylistic, test, toArray, typescript, unicorn, unocss, vinicuncaESLint, vue, yaml };
|