@icebreakers/eslint-config 2.0.1 → 2.0.2
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.cts +39 -3
- package/dist/index.d.ts +39 -3
- package/index.d.ts +6 -0
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1862,7 +1862,7 @@ type CustomRuleVisitorWithExit$1<RuleVisitorType extends RuleVisitor$1> = { [Key
|
|
|
1862
1862
|
type RuleVisitor = RuleVisitor$1;
|
|
1863
1863
|
type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = CustomRuleVisitorWithExit$1<RuleVisitorType>;
|
|
1864
1864
|
//#endregion
|
|
1865
|
-
//#region ../../node_modules/.pnpm/eslint@10.
|
|
1865
|
+
//#region ../../node_modules/.pnpm/eslint@10.1.0_jiti@2.6.1/node_modules/eslint/lib/types/index.d.ts
|
|
1866
1866
|
//------------------------------------------------------------------------------
|
|
1867
1867
|
// Exports
|
|
1868
1868
|
//------------------------------------------------------------------------------
|
|
@@ -2538,31 +2538,65 @@ declare namespace ESLint {
|
|
|
2538
2538
|
type Plugin = Plugin$1;
|
|
2539
2539
|
type FixType = "directive" | "problem" | "suggestion" | "layout";
|
|
2540
2540
|
type CacheStrategy = "content" | "metadata";
|
|
2541
|
+
/** The options with which to configure the ESLint instance. */
|
|
2541
2542
|
interface Options {
|
|
2542
2543
|
// File enumeration
|
|
2544
|
+
/** The value to use for the current working directory. */
|
|
2543
2545
|
cwd?: string | undefined;
|
|
2546
|
+
/** If `false` then `ESLint#lintFiles()` doesn't throw even if no target files found. Defaults to `true`. */
|
|
2544
2547
|
errorOnUnmatchedPattern?: boolean | undefined;
|
|
2548
|
+
/**
|
|
2549
|
+
* Set to false to skip glob resolution of input file paths to lint (default: true).
|
|
2550
|
+
* If false, each input file path is assumed to be a non-glob path to an existing file.
|
|
2551
|
+
*/
|
|
2545
2552
|
globInputPaths?: boolean | undefined;
|
|
2553
|
+
/** False disables all ignore patterns except for the default ones. */
|
|
2546
2554
|
ignore?: boolean | undefined;
|
|
2555
|
+
/** Ignore file patterns to use in addition to config ignores. These patterns are relative to `cwd`. */
|
|
2547
2556
|
ignorePatterns?: string[] | null | undefined;
|
|
2557
|
+
/** When set to true, missing patterns cause the linting operation to short circuit and not report any failures. */
|
|
2548
2558
|
passOnNoPatterns?: boolean | undefined;
|
|
2559
|
+
/** Show warnings when the file list includes ignored files. */
|
|
2549
2560
|
warnIgnored?: boolean | undefined; // Linting
|
|
2561
|
+
/** Enable or disable inline configuration comments. */
|
|
2550
2562
|
allowInlineConfig?: boolean | undefined;
|
|
2563
|
+
/** Base config, extended by all configs used with this instance. */
|
|
2551
2564
|
baseConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
|
2565
|
+
/** Override config, overrides all configs used with this instance. */
|
|
2552
2566
|
overrideConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
|
2567
|
+
/**
|
|
2568
|
+
* Searches for default config file when falsy; doesn't do any config file lookup when `true`; considered to be a config filename when a string.
|
|
2569
|
+
*/
|
|
2553
2570
|
overrideConfigFile?: string | true | null | undefined;
|
|
2571
|
+
/** An array of plugin implementations. */
|
|
2554
2572
|
plugins?: Record<string, Plugin> | null | undefined;
|
|
2573
|
+
/**
|
|
2574
|
+
* Default is `() => true`. A predicate function that filters rules to be run.
|
|
2575
|
+
* This function is called with an object containing `ruleId` and `severity`, and returns `true` if the rule should be run.
|
|
2576
|
+
*/
|
|
2555
2577
|
ruleFilter?: ((arg: {
|
|
2556
2578
|
ruleId: string;
|
|
2557
2579
|
severity: Exclude<Linter.Severity, 0>;
|
|
2558
2580
|
}) => boolean) | undefined;
|
|
2581
|
+
/** True enables added statistics on lint results. */
|
|
2559
2582
|
stats?: boolean | undefined; // Autofix
|
|
2583
|
+
/** Execute in autofix mode. If a function, should return a boolean. */
|
|
2560
2584
|
fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined;
|
|
2585
|
+
/** Array of rule types to apply fixes for. */
|
|
2561
2586
|
fixTypes?: FixType[] | null | undefined; // Cache-related
|
|
2587
|
+
/** Enable result caching. */
|
|
2562
2588
|
cache?: boolean | undefined;
|
|
2589
|
+
/** The cache file to use instead of .eslintcache. */
|
|
2563
2590
|
cacheLocation?: string | undefined;
|
|
2564
|
-
|
|
2591
|
+
/** The strategy used to detect changed files. */
|
|
2592
|
+
cacheStrategy?: CacheStrategy | undefined;
|
|
2593
|
+
/** If true, apply suppressions automatically. Defaults to false. */
|
|
2594
|
+
applySuppressions?: boolean | undefined;
|
|
2595
|
+
/** Path to suppressions file. Relative to cwd. Defaults to eslint-suppressions.json in cwd. */
|
|
2596
|
+
suppressionsLocation?: string | undefined; // Other Options
|
|
2597
|
+
/** Maximum number of linting threads, "auto" to choose automatically, "off" for no multithreading. */
|
|
2565
2598
|
concurrency?: number | "auto" | "off" | undefined;
|
|
2599
|
+
/** Array of feature flags to enable. */
|
|
2566
2600
|
flags?: string[] | undefined;
|
|
2567
2601
|
}
|
|
2568
2602
|
/** A linting result. */
|
|
@@ -2972,9 +3006,11 @@ type UserConfigItem = Awaitable<TypedFlatConfigItem$1 | TypedFlatConfigItem$1[]
|
|
|
2972
3006
|
//#endregion
|
|
2973
3007
|
//#region src/factory.d.ts
|
|
2974
3008
|
declare function icebreaker(options?: UserDefinedOptions, ...userConfigs: UserConfigItem[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
3009
|
+
type IcebreakerEslintConfig = ReturnType<typeof icebreaker>;
|
|
2975
3010
|
declare function icebreakerLegacy(options?: UserDefinedOptions, ...userConfigs: UserConfigItem[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
3011
|
+
type IcebreakerLegacyEslintConfig = ReturnType<typeof icebreakerLegacy>;
|
|
2976
3012
|
//#endregion
|
|
2977
3013
|
//#region src/preset.d.ts
|
|
2978
3014
|
declare function getPresets(options?: UserDefinedOptions, mode?: 'legacy'): [UserDefinedOptions, ...UserConfigItem[]];
|
|
2979
3015
|
//#endregion
|
|
2980
|
-
export { type ConfigNames, type FlatConfigComposer, type StylelintBridgeConfig, type StylelintBridgeOption, type TailwindcssConfig, type TailwindcssOption, type TypedFlatConfigItem, type UserConfigItem, type UserDefinedOptions, getPresets, icebreaker, icebreakerLegacy };
|
|
3016
|
+
export { type ConfigNames, type FlatConfigComposer, IcebreakerEslintConfig, IcebreakerLegacyEslintConfig, type StylelintBridgeConfig, type StylelintBridgeOption, type TailwindcssConfig, type TailwindcssOption, type TypedFlatConfigItem, type UserConfigItem, type UserDefinedOptions, getPresets, icebreaker, icebreakerLegacy };
|
package/dist/index.d.ts
CHANGED
|
@@ -1862,7 +1862,7 @@ type CustomRuleVisitorWithExit$1<RuleVisitorType extends RuleVisitor$1> = { [Key
|
|
|
1862
1862
|
type RuleVisitor = RuleVisitor$1;
|
|
1863
1863
|
type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = CustomRuleVisitorWithExit$1<RuleVisitorType>;
|
|
1864
1864
|
//#endregion
|
|
1865
|
-
//#region ../../node_modules/.pnpm/eslint@10.
|
|
1865
|
+
//#region ../../node_modules/.pnpm/eslint@10.1.0_jiti@2.6.1/node_modules/eslint/lib/types/index.d.ts
|
|
1866
1866
|
//------------------------------------------------------------------------------
|
|
1867
1867
|
// Exports
|
|
1868
1868
|
//------------------------------------------------------------------------------
|
|
@@ -2538,31 +2538,65 @@ declare namespace ESLint {
|
|
|
2538
2538
|
type Plugin = Plugin$1;
|
|
2539
2539
|
type FixType = "directive" | "problem" | "suggestion" | "layout";
|
|
2540
2540
|
type CacheStrategy = "content" | "metadata";
|
|
2541
|
+
/** The options with which to configure the ESLint instance. */
|
|
2541
2542
|
interface Options {
|
|
2542
2543
|
// File enumeration
|
|
2544
|
+
/** The value to use for the current working directory. */
|
|
2543
2545
|
cwd?: string | undefined;
|
|
2546
|
+
/** If `false` then `ESLint#lintFiles()` doesn't throw even if no target files found. Defaults to `true`. */
|
|
2544
2547
|
errorOnUnmatchedPattern?: boolean | undefined;
|
|
2548
|
+
/**
|
|
2549
|
+
* Set to false to skip glob resolution of input file paths to lint (default: true).
|
|
2550
|
+
* If false, each input file path is assumed to be a non-glob path to an existing file.
|
|
2551
|
+
*/
|
|
2545
2552
|
globInputPaths?: boolean | undefined;
|
|
2553
|
+
/** False disables all ignore patterns except for the default ones. */
|
|
2546
2554
|
ignore?: boolean | undefined;
|
|
2555
|
+
/** Ignore file patterns to use in addition to config ignores. These patterns are relative to `cwd`. */
|
|
2547
2556
|
ignorePatterns?: string[] | null | undefined;
|
|
2557
|
+
/** When set to true, missing patterns cause the linting operation to short circuit and not report any failures. */
|
|
2548
2558
|
passOnNoPatterns?: boolean | undefined;
|
|
2559
|
+
/** Show warnings when the file list includes ignored files. */
|
|
2549
2560
|
warnIgnored?: boolean | undefined; // Linting
|
|
2561
|
+
/** Enable or disable inline configuration comments. */
|
|
2550
2562
|
allowInlineConfig?: boolean | undefined;
|
|
2563
|
+
/** Base config, extended by all configs used with this instance. */
|
|
2551
2564
|
baseConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
|
2565
|
+
/** Override config, overrides all configs used with this instance. */
|
|
2552
2566
|
overrideConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
|
2567
|
+
/**
|
|
2568
|
+
* Searches for default config file when falsy; doesn't do any config file lookup when `true`; considered to be a config filename when a string.
|
|
2569
|
+
*/
|
|
2553
2570
|
overrideConfigFile?: string | true | null | undefined;
|
|
2571
|
+
/** An array of plugin implementations. */
|
|
2554
2572
|
plugins?: Record<string, Plugin> | null | undefined;
|
|
2573
|
+
/**
|
|
2574
|
+
* Default is `() => true`. A predicate function that filters rules to be run.
|
|
2575
|
+
* This function is called with an object containing `ruleId` and `severity`, and returns `true` if the rule should be run.
|
|
2576
|
+
*/
|
|
2555
2577
|
ruleFilter?: ((arg: {
|
|
2556
2578
|
ruleId: string;
|
|
2557
2579
|
severity: Exclude<Linter.Severity, 0>;
|
|
2558
2580
|
}) => boolean) | undefined;
|
|
2581
|
+
/** True enables added statistics on lint results. */
|
|
2559
2582
|
stats?: boolean | undefined; // Autofix
|
|
2583
|
+
/** Execute in autofix mode. If a function, should return a boolean. */
|
|
2560
2584
|
fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined;
|
|
2585
|
+
/** Array of rule types to apply fixes for. */
|
|
2561
2586
|
fixTypes?: FixType[] | null | undefined; // Cache-related
|
|
2587
|
+
/** Enable result caching. */
|
|
2562
2588
|
cache?: boolean | undefined;
|
|
2589
|
+
/** The cache file to use instead of .eslintcache. */
|
|
2563
2590
|
cacheLocation?: string | undefined;
|
|
2564
|
-
|
|
2591
|
+
/** The strategy used to detect changed files. */
|
|
2592
|
+
cacheStrategy?: CacheStrategy | undefined;
|
|
2593
|
+
/** If true, apply suppressions automatically. Defaults to false. */
|
|
2594
|
+
applySuppressions?: boolean | undefined;
|
|
2595
|
+
/** Path to suppressions file. Relative to cwd. Defaults to eslint-suppressions.json in cwd. */
|
|
2596
|
+
suppressionsLocation?: string | undefined; // Other Options
|
|
2597
|
+
/** Maximum number of linting threads, "auto" to choose automatically, "off" for no multithreading. */
|
|
2565
2598
|
concurrency?: number | "auto" | "off" | undefined;
|
|
2599
|
+
/** Array of feature flags to enable. */
|
|
2566
2600
|
flags?: string[] | undefined;
|
|
2567
2601
|
}
|
|
2568
2602
|
/** A linting result. */
|
|
@@ -2972,9 +3006,11 @@ type UserConfigItem = Awaitable<TypedFlatConfigItem$1 | TypedFlatConfigItem$1[]
|
|
|
2972
3006
|
//#endregion
|
|
2973
3007
|
//#region src/factory.d.ts
|
|
2974
3008
|
declare function icebreaker(options?: UserDefinedOptions, ...userConfigs: UserConfigItem[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
3009
|
+
type IcebreakerEslintConfig = ReturnType<typeof icebreaker>;
|
|
2975
3010
|
declare function icebreakerLegacy(options?: UserDefinedOptions, ...userConfigs: UserConfigItem[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
3011
|
+
type IcebreakerLegacyEslintConfig = ReturnType<typeof icebreakerLegacy>;
|
|
2976
3012
|
//#endregion
|
|
2977
3013
|
//#region src/preset.d.ts
|
|
2978
3014
|
declare function getPresets(options?: UserDefinedOptions, mode?: 'legacy'): [UserDefinedOptions, ...UserConfigItem[]];
|
|
2979
3015
|
//#endregion
|
|
2980
|
-
export { type ConfigNames, type FlatConfigComposer, type StylelintBridgeConfig, type StylelintBridgeOption, type TailwindcssConfig, type TailwindcssOption, type TypedFlatConfigItem, type UserConfigItem, type UserDefinedOptions, getPresets, icebreaker, icebreakerLegacy };
|
|
3016
|
+
export { type ConfigNames, type FlatConfigComposer, IcebreakerEslintConfig, IcebreakerLegacyEslintConfig, type StylelintBridgeConfig, type StylelintBridgeOption, type TailwindcssConfig, type TailwindcssOption, type TypedFlatConfigItem, type UserConfigItem, type UserDefinedOptions, getPresets, icebreaker, icebreakerLegacy };
|
package/index.d.ts
CHANGED
|
@@ -46,11 +46,17 @@ export declare function icebreaker(
|
|
|
46
46
|
...userConfigs: UserConfigItem[]
|
|
47
47
|
): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>
|
|
48
48
|
|
|
49
|
+
export type IcebreakerEslintConfig = ReturnType<typeof icebreaker>
|
|
50
|
+
|
|
49
51
|
export declare function icebreakerLegacy(
|
|
50
52
|
options?: UserDefinedOptions,
|
|
51
53
|
...userConfigs: UserConfigItem[]
|
|
52
54
|
): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>
|
|
53
55
|
|
|
56
|
+
export type IcebreakerLegacyEslintConfig = ReturnType<
|
|
57
|
+
typeof icebreakerLegacy
|
|
58
|
+
>
|
|
59
|
+
|
|
54
60
|
export type {
|
|
55
61
|
ConfigNames,
|
|
56
62
|
FlatConfigComposer,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "ESLint preset from Icebreaker's dev-configs",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
59
59
|
"eslint-plugin-tailwindcss": "3.18.2",
|
|
60
60
|
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
61
|
+
"eslint-plugin-better-stylelint": "0.1.1",
|
|
62
|
+
"@icebreakers/stylelint-config": "2.1.1"
|
|
63
63
|
},
|
|
64
64
|
"optionalDependencies": {
|
|
65
65
|
"@unocss/eslint-plugin": "66.6.7",
|