@ntnyq/eslint-config 3.0.0-beta.2 → 3.0.0-beta.3
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 +591 -554
- package/dist/index.d.cts +71 -64
- package/dist/index.d.ts +71 -64
- package/dist/index.js +588 -553
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -26,6 +26,16 @@ export { vueEslintParser as parserVue };
|
|
|
26
26
|
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
27
27
|
export { jsoncEslintParser as parserJsonc };
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @file Type Utils
|
|
31
|
+
*/
|
|
32
|
+
type Arrayable<T> = T | T[];
|
|
33
|
+
type Awaitable<T> = T | Promise<T>;
|
|
34
|
+
type InteropModuleDefault<T> = T extends {
|
|
35
|
+
default: infer U;
|
|
36
|
+
} ? U : T;
|
|
37
|
+
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
38
|
+
|
|
29
39
|
interface RuleOptions {
|
|
30
40
|
/**
|
|
31
41
|
* require a `eslint-enable` comment for every `eslint-disable` comment
|
|
@@ -8773,53 +8783,21 @@ type YmlSpacedComment = [] | [("always" | "never")] | [
|
|
|
8773
8783
|
markers?: string[];
|
|
8774
8784
|
}
|
|
8775
8785
|
];
|
|
8776
|
-
type ConfigName = 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/
|
|
8786
|
+
type ConfigName = 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/scripts' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'ntnyq/markdown/extensions' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
|
|
8777
8787
|
|
|
8778
|
-
/**
|
|
8779
|
-
* Parser options
|
|
8780
|
-
*/
|
|
8781
|
-
type ParserOptions = Linter.ParserOptions;
|
|
8782
|
-
/**
|
|
8783
|
-
* Rules
|
|
8784
|
-
*/
|
|
8785
|
-
type Rules = RuleOptions;
|
|
8786
8788
|
/**
|
|
8787
8789
|
* Typed flat config item
|
|
8788
8790
|
*/
|
|
8789
|
-
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord &
|
|
8791
|
+
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'plugins'> & {
|
|
8790
8792
|
/**
|
|
8791
8793
|
* Most plugin are not properly typed
|
|
8792
8794
|
*/
|
|
8793
8795
|
plugins?: Record<string, any>;
|
|
8794
8796
|
};
|
|
8795
8797
|
/**
|
|
8796
|
-
*
|
|
8797
|
-
*/
|
|
8798
|
-
type LinterConfig = TypedConfigItem;
|
|
8799
|
-
/**
|
|
8800
|
-
* ESLint rules
|
|
8801
|
-
*/
|
|
8802
|
-
type RuleRecord = Linter.RulesRecord;
|
|
8803
|
-
/**
|
|
8804
|
-
* ESLint rules entry
|
|
8805
|
-
*/
|
|
8806
|
-
type RuleRecordEntry = Record<string, RuleRecord>;
|
|
8807
|
-
|
|
8808
|
-
/**
|
|
8809
|
-
* @file Type Utils
|
|
8798
|
+
* Parser options
|
|
8810
8799
|
*/
|
|
8811
|
-
|
|
8812
|
-
type Arrayable<T> = T | T[];
|
|
8813
|
-
type Awaitable<T> = T | Promise<T>;
|
|
8814
|
-
type InteropModuleDefault<T> = T extends {
|
|
8815
|
-
default: infer U;
|
|
8816
|
-
} ? U : T;
|
|
8817
|
-
interface OverridesOptions<Rules = TypedConfigItem['rules']> {
|
|
8818
|
-
files?: TypedConfigItem['files'];
|
|
8819
|
-
rules?: Rules;
|
|
8820
|
-
parserOptions?: ParserOptions;
|
|
8821
|
-
}
|
|
8822
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
8800
|
+
type ParserOptions = Linter.ParserOptions;
|
|
8823
8801
|
|
|
8824
8802
|
/**
|
|
8825
8803
|
* @file Config options
|
|
@@ -8849,6 +8827,12 @@ interface ConfigImportsOptions extends OptionsOverrides {
|
|
|
8849
8827
|
interface ConfigNodeOptions extends OptionsOverrides {
|
|
8850
8828
|
}
|
|
8851
8829
|
interface ConfigPrettierOptions extends OptionsOverrides {
|
|
8830
|
+
/**
|
|
8831
|
+
* Prettier level
|
|
8832
|
+
*
|
|
8833
|
+
* @default 'warn'
|
|
8834
|
+
*/
|
|
8835
|
+
level?: 'warn' | 'error';
|
|
8852
8836
|
}
|
|
8853
8837
|
interface ConfigPerfectionistOptions extends OptionsOverrides {
|
|
8854
8838
|
}
|
|
@@ -8857,8 +8841,22 @@ interface ConfigCommentsOptions extends OptionsOverrides {
|
|
|
8857
8841
|
interface ConfigRegexpOptions extends OptionsOverrides {
|
|
8858
8842
|
}
|
|
8859
8843
|
interface ConfigJavaScriptOptions extends OptionsOverrides {
|
|
8844
|
+
/**
|
|
8845
|
+
* Enable strict checking for JavaScript files
|
|
8846
|
+
*
|
|
8847
|
+
* @default false
|
|
8848
|
+
*/
|
|
8849
|
+
strict?: boolean;
|
|
8860
8850
|
}
|
|
8861
8851
|
interface ConfigTypeScriptOptions extends OptionsOverrides {
|
|
8852
|
+
/**
|
|
8853
|
+
* Enable type aware check for TypeScript files
|
|
8854
|
+
*/
|
|
8855
|
+
tsconfigPath?: string;
|
|
8856
|
+
/**
|
|
8857
|
+
* Additional parser options
|
|
8858
|
+
*/
|
|
8859
|
+
parserOptions?: Partial<ParserOptions>;
|
|
8862
8860
|
}
|
|
8863
8861
|
interface ConfigJsoncOptions extends OptionsOverrides {
|
|
8864
8862
|
}
|
|
@@ -8869,6 +8867,12 @@ interface ConfigMarkdownOptions extends OptionsOverrides {
|
|
|
8869
8867
|
interface ConfigTomlOptions extends OptionsOverrides {
|
|
8870
8868
|
}
|
|
8871
8869
|
interface ConfigVueOptions extends OptionsOverrides {
|
|
8870
|
+
/**
|
|
8871
|
+
* Vue version
|
|
8872
|
+
*
|
|
8873
|
+
* @default 3
|
|
8874
|
+
*/
|
|
8875
|
+
vueVersion?: 2 | 3;
|
|
8872
8876
|
}
|
|
8873
8877
|
interface ConfigVitestOptions extends OptionsOverrides {
|
|
8874
8878
|
}
|
|
@@ -8880,6 +8884,7 @@ interface ConfigUnusedImportsOptions extends OptionsOverrides {
|
|
|
8880
8884
|
interface ConfigOptions {
|
|
8881
8885
|
command?: boolean;
|
|
8882
8886
|
sortTsConfig?: boolean;
|
|
8887
|
+
sortI18nLocale?: boolean;
|
|
8883
8888
|
sortPackageJson?: boolean;
|
|
8884
8889
|
ignores?: ConfigIgnoresOptions;
|
|
8885
8890
|
imports?: ConfigImportsOptions;
|
|
@@ -8931,7 +8936,7 @@ declare function toArray<T>(val?: Arrayable<T>): T[];
|
|
|
8931
8936
|
*/
|
|
8932
8937
|
declare function loadPlugin<T = unknown>(name: string): Promise<T>;
|
|
8933
8938
|
|
|
8934
|
-
declare function getOverrides<K extends keyof ConfigOptions>(options: ConfigOptions, key: K): Partial<
|
|
8939
|
+
declare function getOverrides<K extends keyof ConfigOptions>(options: ConfigOptions, key: K): Partial<TypedConfigItem['rules'] & RuleOptions>;
|
|
8935
8940
|
|
|
8936
8941
|
/**
|
|
8937
8942
|
* Interop default export from a module
|
|
@@ -8952,7 +8957,7 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
|
8952
8957
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
8953
8958
|
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
8954
8959
|
declare const GLOB_DTS = "**/*.d.?([cm])ts";
|
|
8955
|
-
declare const GLOB_TEST = "**/*.{test,spec}.?([cm])[jt]s?(x)";
|
|
8960
|
+
declare const GLOB_TEST = "**/*.{test,spec,bench,benchmark}.?([cm])[jt]s?(x)";
|
|
8956
8961
|
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
8957
8962
|
declare const GLOB_CSS = "**/*.css";
|
|
8958
8963
|
declare const GLOB_LESS = "**/*.less";
|
|
@@ -8961,10 +8966,12 @@ declare const GLOB_JSON = "**/*.json";
|
|
|
8961
8966
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
8962
8967
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
8963
8968
|
declare const GLOB_VUE = "**/*.vue";
|
|
8964
|
-
declare const GLOB_MARKDOWN = "**/*.md";
|
|
8965
8969
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
8966
8970
|
declare const GLOB_TOML = "**/*.toml";
|
|
8967
8971
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
8972
|
+
declare const GLOB_MARKDOWN = "**/*.md";
|
|
8973
|
+
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
8974
|
+
declare const GLOB_MARKDOWN_NESTED = "**/*.md/*.md";
|
|
8968
8975
|
declare const GLOB_ALL_SRC: string[];
|
|
8969
8976
|
declare const GLOB_NODE_MODULES = "**/node_modules/**";
|
|
8970
8977
|
declare const GLOB_DIST = "**/dist/**";
|
|
@@ -8974,50 +8981,50 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
8974
8981
|
/**
|
|
8975
8982
|
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
8976
8983
|
*/
|
|
8977
|
-
declare const ignores: (customIgnores?: ConfigIgnoresOptions) =>
|
|
8984
|
+
declare const ignores: (customIgnores?: ConfigIgnoresOptions) => TypedConfigItem[];
|
|
8978
8985
|
|
|
8979
|
-
declare const node: (options?: ConfigNodeOptions) =>
|
|
8986
|
+
declare const node: (options?: ConfigNodeOptions) => TypedConfigItem[];
|
|
8980
8987
|
|
|
8981
|
-
declare const jsdoc: (options?: ConfigJsdocOptions) =>
|
|
8988
|
+
declare const jsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
|
|
8982
8989
|
|
|
8983
|
-
declare const imports: (options?: ConfigImportsOptions) =>
|
|
8990
|
+
declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
|
|
8984
8991
|
|
|
8985
|
-
declare const unicorn: (options?: ConfigUnicornOptions) =>
|
|
8992
|
+
declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
|
|
8986
8993
|
|
|
8987
|
-
declare const prettier: (options?: ConfigPrettierOptions) =>
|
|
8994
|
+
declare const prettier: (options?: ConfigPrettierOptions) => TypedConfigItem[];
|
|
8988
8995
|
|
|
8989
|
-
declare const comments: (options?: ConfigCommentsOptions) =>
|
|
8996
|
+
declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
|
|
8990
8997
|
|
|
8991
|
-
declare const javascript: (
|
|
8992
|
-
declare const jsx: () =>
|
|
8998
|
+
declare const javascript: (options?: ConfigJavaScriptOptions) => TypedConfigItem[];
|
|
8999
|
+
declare const jsx: () => TypedConfigItem[];
|
|
8993
9000
|
|
|
8994
9001
|
declare const typescriptCore: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
8995
|
-
declare const typescript: (options?: ConfigTypeScriptOptions) =>
|
|
9002
|
+
declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
8996
9003
|
|
|
8997
|
-
declare const unusedImports: (options?: ConfigUnusedImportsOptions) =>
|
|
9004
|
+
declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
|
|
8998
9005
|
|
|
8999
|
-
declare const perfectionist: (options?: ConfigPerfectionistOptions) =>
|
|
9006
|
+
declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConfigItem[];
|
|
9000
9007
|
|
|
9001
|
-
declare const regexp: (options?: ConfigRegexpOptions) =>
|
|
9008
|
+
declare const regexp: (options?: ConfigRegexpOptions) => TypedConfigItem[];
|
|
9002
9009
|
|
|
9003
|
-
declare const unocss: (options?: ConfigUnoCSSOptions) =>
|
|
9010
|
+
declare const unocss: (options?: ConfigUnoCSSOptions) => TypedConfigItem[];
|
|
9004
9011
|
|
|
9005
|
-
declare const command: () =>
|
|
9012
|
+
declare const command: () => TypedConfigItem[];
|
|
9006
9013
|
|
|
9007
|
-
declare const vitest: (options?: ConfigVitestOptions) =>
|
|
9014
|
+
declare const vitest: (options?: ConfigVitestOptions) => TypedConfigItem[];
|
|
9008
9015
|
|
|
9009
|
-
declare
|
|
9010
|
-
declare const vue: (options?: ConfigVueOptions) => LinterConfig[];
|
|
9016
|
+
declare const vue: (options?: ConfigVueOptions) => TypedConfigItem[];
|
|
9011
9017
|
|
|
9012
|
-
declare const yml: (options?: ConfigYmlOptions) =>
|
|
9018
|
+
declare const yml: (options?: ConfigYmlOptions) => TypedConfigItem[];
|
|
9013
9019
|
|
|
9014
|
-
declare const toml: (options?: ConfigTomlOptions) =>
|
|
9020
|
+
declare const toml: (options?: ConfigTomlOptions) => TypedConfigItem[];
|
|
9015
9021
|
|
|
9016
|
-
declare const sortPackageJson: () =>
|
|
9017
|
-
declare const sortTsConfig: () =>
|
|
9022
|
+
declare const sortPackageJson: () => TypedConfigItem[];
|
|
9023
|
+
declare const sortTsConfig: () => TypedConfigItem[];
|
|
9024
|
+
declare const sortI18nLocale: () => TypedConfigItem[];
|
|
9018
9025
|
|
|
9019
|
-
declare const jsonc: (options?: ConfigJsoncOptions) =>
|
|
9026
|
+
declare const jsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
|
|
9020
9027
|
|
|
9021
|
-
declare const markdown: (options?: ConfigMarkdownOptions) =>
|
|
9028
|
+
declare const markdown: (options?: ConfigMarkdownOptions) => TypedConfigItem[];
|
|
9022
9029
|
|
|
9023
|
-
export { type Arrayable, type Awaitable, type ConfigCommentsOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigName, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type
|
|
9030
|
+
export { type Arrayable, type Awaitable, type ConfigCommentsOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigName, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsFiles, type OptionsOverrides, type ParserOptions, type ResolvedOptions, type RuleOptions, type TypedConfigItem, command, comments, getOverrides, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,16 @@ export { vueEslintParser as parserVue };
|
|
|
26
26
|
import * as jsoncEslintParser from 'jsonc-eslint-parser';
|
|
27
27
|
export { jsoncEslintParser as parserJsonc };
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @file Type Utils
|
|
31
|
+
*/
|
|
32
|
+
type Arrayable<T> = T | T[];
|
|
33
|
+
type Awaitable<T> = T | Promise<T>;
|
|
34
|
+
type InteropModuleDefault<T> = T extends {
|
|
35
|
+
default: infer U;
|
|
36
|
+
} ? U : T;
|
|
37
|
+
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
38
|
+
|
|
29
39
|
interface RuleOptions {
|
|
30
40
|
/**
|
|
31
41
|
* require a `eslint-enable` comment for every `eslint-disable` comment
|
|
@@ -8773,53 +8783,21 @@ type YmlSpacedComment = [] | [("always" | "never")] | [
|
|
|
8773
8783
|
markers?: string[];
|
|
8774
8784
|
}
|
|
8775
8785
|
];
|
|
8776
|
-
type ConfigName = 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/
|
|
8786
|
+
type ConfigName = 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/scripts' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'ntnyq/markdown/extensions' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
|
|
8777
8787
|
|
|
8778
|
-
/**
|
|
8779
|
-
* Parser options
|
|
8780
|
-
*/
|
|
8781
|
-
type ParserOptions = Linter.ParserOptions;
|
|
8782
|
-
/**
|
|
8783
|
-
* Rules
|
|
8784
|
-
*/
|
|
8785
|
-
type Rules = RuleOptions;
|
|
8786
8788
|
/**
|
|
8787
8789
|
* Typed flat config item
|
|
8788
8790
|
*/
|
|
8789
|
-
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord &
|
|
8791
|
+
type TypedConfigItem = Omit<Linter.Config<Linter.RulesRecord & RuleOptions>, 'plugins'> & {
|
|
8790
8792
|
/**
|
|
8791
8793
|
* Most plugin are not properly typed
|
|
8792
8794
|
*/
|
|
8793
8795
|
plugins?: Record<string, any>;
|
|
8794
8796
|
};
|
|
8795
8797
|
/**
|
|
8796
|
-
*
|
|
8797
|
-
*/
|
|
8798
|
-
type LinterConfig = TypedConfigItem;
|
|
8799
|
-
/**
|
|
8800
|
-
* ESLint rules
|
|
8801
|
-
*/
|
|
8802
|
-
type RuleRecord = Linter.RulesRecord;
|
|
8803
|
-
/**
|
|
8804
|
-
* ESLint rules entry
|
|
8805
|
-
*/
|
|
8806
|
-
type RuleRecordEntry = Record<string, RuleRecord>;
|
|
8807
|
-
|
|
8808
|
-
/**
|
|
8809
|
-
* @file Type Utils
|
|
8798
|
+
* Parser options
|
|
8810
8799
|
*/
|
|
8811
|
-
|
|
8812
|
-
type Arrayable<T> = T | T[];
|
|
8813
|
-
type Awaitable<T> = T | Promise<T>;
|
|
8814
|
-
type InteropModuleDefault<T> = T extends {
|
|
8815
|
-
default: infer U;
|
|
8816
|
-
} ? U : T;
|
|
8817
|
-
interface OverridesOptions<Rules = TypedConfigItem['rules']> {
|
|
8818
|
-
files?: TypedConfigItem['files'];
|
|
8819
|
-
rules?: Rules;
|
|
8820
|
-
parserOptions?: ParserOptions;
|
|
8821
|
-
}
|
|
8822
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
8800
|
+
type ParserOptions = Linter.ParserOptions;
|
|
8823
8801
|
|
|
8824
8802
|
/**
|
|
8825
8803
|
* @file Config options
|
|
@@ -8849,6 +8827,12 @@ interface ConfigImportsOptions extends OptionsOverrides {
|
|
|
8849
8827
|
interface ConfigNodeOptions extends OptionsOverrides {
|
|
8850
8828
|
}
|
|
8851
8829
|
interface ConfigPrettierOptions extends OptionsOverrides {
|
|
8830
|
+
/**
|
|
8831
|
+
* Prettier level
|
|
8832
|
+
*
|
|
8833
|
+
* @default 'warn'
|
|
8834
|
+
*/
|
|
8835
|
+
level?: 'warn' | 'error';
|
|
8852
8836
|
}
|
|
8853
8837
|
interface ConfigPerfectionistOptions extends OptionsOverrides {
|
|
8854
8838
|
}
|
|
@@ -8857,8 +8841,22 @@ interface ConfigCommentsOptions extends OptionsOverrides {
|
|
|
8857
8841
|
interface ConfigRegexpOptions extends OptionsOverrides {
|
|
8858
8842
|
}
|
|
8859
8843
|
interface ConfigJavaScriptOptions extends OptionsOverrides {
|
|
8844
|
+
/**
|
|
8845
|
+
* Enable strict checking for JavaScript files
|
|
8846
|
+
*
|
|
8847
|
+
* @default false
|
|
8848
|
+
*/
|
|
8849
|
+
strict?: boolean;
|
|
8860
8850
|
}
|
|
8861
8851
|
interface ConfigTypeScriptOptions extends OptionsOverrides {
|
|
8852
|
+
/**
|
|
8853
|
+
* Enable type aware check for TypeScript files
|
|
8854
|
+
*/
|
|
8855
|
+
tsconfigPath?: string;
|
|
8856
|
+
/**
|
|
8857
|
+
* Additional parser options
|
|
8858
|
+
*/
|
|
8859
|
+
parserOptions?: Partial<ParserOptions>;
|
|
8862
8860
|
}
|
|
8863
8861
|
interface ConfigJsoncOptions extends OptionsOverrides {
|
|
8864
8862
|
}
|
|
@@ -8869,6 +8867,12 @@ interface ConfigMarkdownOptions extends OptionsOverrides {
|
|
|
8869
8867
|
interface ConfigTomlOptions extends OptionsOverrides {
|
|
8870
8868
|
}
|
|
8871
8869
|
interface ConfigVueOptions extends OptionsOverrides {
|
|
8870
|
+
/**
|
|
8871
|
+
* Vue version
|
|
8872
|
+
*
|
|
8873
|
+
* @default 3
|
|
8874
|
+
*/
|
|
8875
|
+
vueVersion?: 2 | 3;
|
|
8872
8876
|
}
|
|
8873
8877
|
interface ConfigVitestOptions extends OptionsOverrides {
|
|
8874
8878
|
}
|
|
@@ -8880,6 +8884,7 @@ interface ConfigUnusedImportsOptions extends OptionsOverrides {
|
|
|
8880
8884
|
interface ConfigOptions {
|
|
8881
8885
|
command?: boolean;
|
|
8882
8886
|
sortTsConfig?: boolean;
|
|
8887
|
+
sortI18nLocale?: boolean;
|
|
8883
8888
|
sortPackageJson?: boolean;
|
|
8884
8889
|
ignores?: ConfigIgnoresOptions;
|
|
8885
8890
|
imports?: ConfigImportsOptions;
|
|
@@ -8931,7 +8936,7 @@ declare function toArray<T>(val?: Arrayable<T>): T[];
|
|
|
8931
8936
|
*/
|
|
8932
8937
|
declare function loadPlugin<T = unknown>(name: string): Promise<T>;
|
|
8933
8938
|
|
|
8934
|
-
declare function getOverrides<K extends keyof ConfigOptions>(options: ConfigOptions, key: K): Partial<
|
|
8939
|
+
declare function getOverrides<K extends keyof ConfigOptions>(options: ConfigOptions, key: K): Partial<TypedConfigItem['rules'] & RuleOptions>;
|
|
8935
8940
|
|
|
8936
8941
|
/**
|
|
8937
8942
|
* Interop default export from a module
|
|
@@ -8952,7 +8957,7 @@ declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
|
8952
8957
|
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
8953
8958
|
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
8954
8959
|
declare const GLOB_DTS = "**/*.d.?([cm])ts";
|
|
8955
|
-
declare const GLOB_TEST = "**/*.{test,spec}.?([cm])[jt]s?(x)";
|
|
8960
|
+
declare const GLOB_TEST = "**/*.{test,spec,bench,benchmark}.?([cm])[jt]s?(x)";
|
|
8956
8961
|
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
8957
8962
|
declare const GLOB_CSS = "**/*.css";
|
|
8958
8963
|
declare const GLOB_LESS = "**/*.less";
|
|
@@ -8961,10 +8966,12 @@ declare const GLOB_JSON = "**/*.json";
|
|
|
8961
8966
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
8962
8967
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
8963
8968
|
declare const GLOB_VUE = "**/*.vue";
|
|
8964
|
-
declare const GLOB_MARKDOWN = "**/*.md";
|
|
8965
8969
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
8966
8970
|
declare const GLOB_TOML = "**/*.toml";
|
|
8967
8971
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
8972
|
+
declare const GLOB_MARKDOWN = "**/*.md";
|
|
8973
|
+
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
8974
|
+
declare const GLOB_MARKDOWN_NESTED = "**/*.md/*.md";
|
|
8968
8975
|
declare const GLOB_ALL_SRC: string[];
|
|
8969
8976
|
declare const GLOB_NODE_MODULES = "**/node_modules/**";
|
|
8970
8977
|
declare const GLOB_DIST = "**/dist/**";
|
|
@@ -8974,50 +8981,50 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
8974
8981
|
/**
|
|
8975
8982
|
* @see https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
|
8976
8983
|
*/
|
|
8977
|
-
declare const ignores: (customIgnores?: ConfigIgnoresOptions) =>
|
|
8984
|
+
declare const ignores: (customIgnores?: ConfigIgnoresOptions) => TypedConfigItem[];
|
|
8978
8985
|
|
|
8979
|
-
declare const node: (options?: ConfigNodeOptions) =>
|
|
8986
|
+
declare const node: (options?: ConfigNodeOptions) => TypedConfigItem[];
|
|
8980
8987
|
|
|
8981
|
-
declare const jsdoc: (options?: ConfigJsdocOptions) =>
|
|
8988
|
+
declare const jsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
|
|
8982
8989
|
|
|
8983
|
-
declare const imports: (options?: ConfigImportsOptions) =>
|
|
8990
|
+
declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
|
|
8984
8991
|
|
|
8985
|
-
declare const unicorn: (options?: ConfigUnicornOptions) =>
|
|
8992
|
+
declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
|
|
8986
8993
|
|
|
8987
|
-
declare const prettier: (options?: ConfigPrettierOptions) =>
|
|
8994
|
+
declare const prettier: (options?: ConfigPrettierOptions) => TypedConfigItem[];
|
|
8988
8995
|
|
|
8989
|
-
declare const comments: (options?: ConfigCommentsOptions) =>
|
|
8996
|
+
declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
|
|
8990
8997
|
|
|
8991
|
-
declare const javascript: (
|
|
8992
|
-
declare const jsx: () =>
|
|
8998
|
+
declare const javascript: (options?: ConfigJavaScriptOptions) => TypedConfigItem[];
|
|
8999
|
+
declare const jsx: () => TypedConfigItem[];
|
|
8993
9000
|
|
|
8994
9001
|
declare const typescriptCore: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
8995
|
-
declare const typescript: (options?: ConfigTypeScriptOptions) =>
|
|
9002
|
+
declare const typescript: (options?: ConfigTypeScriptOptions) => TypedConfigItem[];
|
|
8996
9003
|
|
|
8997
|
-
declare const unusedImports: (options?: ConfigUnusedImportsOptions) =>
|
|
9004
|
+
declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
|
|
8998
9005
|
|
|
8999
|
-
declare const perfectionist: (options?: ConfigPerfectionistOptions) =>
|
|
9006
|
+
declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConfigItem[];
|
|
9000
9007
|
|
|
9001
|
-
declare const regexp: (options?: ConfigRegexpOptions) =>
|
|
9008
|
+
declare const regexp: (options?: ConfigRegexpOptions) => TypedConfigItem[];
|
|
9002
9009
|
|
|
9003
|
-
declare const unocss: (options?: ConfigUnoCSSOptions) =>
|
|
9010
|
+
declare const unocss: (options?: ConfigUnoCSSOptions) => TypedConfigItem[];
|
|
9004
9011
|
|
|
9005
|
-
declare const command: () =>
|
|
9012
|
+
declare const command: () => TypedConfigItem[];
|
|
9006
9013
|
|
|
9007
|
-
declare const vitest: (options?: ConfigVitestOptions) =>
|
|
9014
|
+
declare const vitest: (options?: ConfigVitestOptions) => TypedConfigItem[];
|
|
9008
9015
|
|
|
9009
|
-
declare
|
|
9010
|
-
declare const vue: (options?: ConfigVueOptions) => LinterConfig[];
|
|
9016
|
+
declare const vue: (options?: ConfigVueOptions) => TypedConfigItem[];
|
|
9011
9017
|
|
|
9012
|
-
declare const yml: (options?: ConfigYmlOptions) =>
|
|
9018
|
+
declare const yml: (options?: ConfigYmlOptions) => TypedConfigItem[];
|
|
9013
9019
|
|
|
9014
|
-
declare const toml: (options?: ConfigTomlOptions) =>
|
|
9020
|
+
declare const toml: (options?: ConfigTomlOptions) => TypedConfigItem[];
|
|
9015
9021
|
|
|
9016
|
-
declare const sortPackageJson: () =>
|
|
9017
|
-
declare const sortTsConfig: () =>
|
|
9022
|
+
declare const sortPackageJson: () => TypedConfigItem[];
|
|
9023
|
+
declare const sortTsConfig: () => TypedConfigItem[];
|
|
9024
|
+
declare const sortI18nLocale: () => TypedConfigItem[];
|
|
9018
9025
|
|
|
9019
|
-
declare const jsonc: (options?: ConfigJsoncOptions) =>
|
|
9026
|
+
declare const jsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
|
|
9020
9027
|
|
|
9021
|
-
declare const markdown: (options?: ConfigMarkdownOptions) =>
|
|
9028
|
+
declare const markdown: (options?: ConfigMarkdownOptions) => TypedConfigItem[];
|
|
9022
9029
|
|
|
9023
|
-
export { type Arrayable, type Awaitable, type ConfigCommentsOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigName, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type
|
|
9030
|
+
export { type Arrayable, type Awaitable, type ConfigCommentsOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigName, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsFiles, type OptionsOverrides, type ParserOptions, type ResolvedOptions, type RuleOptions, type TypedConfigItem, command, comments, getOverrides, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
|