This commit is contained in:
Alex
2023-12-20 12:23:05 -05:00
parent 02fe9f4799
commit 3ec7c342ba
18 changed files with 1732 additions and 700 deletions

34
dist/index.d.ts vendored
View File

@ -1,5 +1,7 @@
// Generated by dts-bundle-generator v8.1.2
// Generated by dts-bundle-generator v9.0.0
import { ESLintUtils } from '@typescript-eslint/utils';
import { Rule } from 'eslint';
import { ESLintConfig, Rules } from 'eslint-define-config';
export declare const error = "error";
@ -34,13 +36,39 @@ export type Config = Omit<ESLintConfig, "rules"> & {
* @see [Rules](https://eslint.org/docs/latest/user-guide/configuring/rules)
*/
rules?: RuleOptions;
/**
*/
customRules?: {
rule: () => Promise<{
default: Rule.RuleModule | ESLintUtils.RuleModule<string, unknown[]>;
}>;
options?: RuleLevel;
}[];
};
export declare function defineCustomRule<Options extends readonly unknown[]>(rule: () => Promise<{
default: Rule.RuleModule | ESLintUtils.RuleModule<string, Options>;
}>, options?: Options): {
rule: () => Promise<{
default: Rule.RuleModule | ESLintUtils.RuleModule<string, Options>;
}>;
options: Options | undefined;
};
/**
* Returns a ESLint config object.
*
* By default, it includes `["@typescript-eslint", "import", "prettier"]` configs.
* Additional bundled plugins include `["react", "react-refresh", "jsx-a11y", "unicorn"]`.
* Additional bundled plugins include:
*
* 1. [react](https://github.com/jsx-eslint/eslint-plugin-react#list-of-supported-rules)
* 2. [react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh)
* 3. [jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#supported-rules)
* 4. [unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn#rules)
* 5. [n](https://github.com/eslint-community/eslint-plugin-n#-rules) (Node.js specific)
* 6. [jsdoc](https://github.com/gajus/eslint-plugin-jsdoc#rules)
*
* Non bundled:
* 1. [graphql](https://the-guild.dev/graphql/eslint/rules)
*/
export declare function extendConfig({ plugins, settings, rules, extends: _extends, overrides, ...rest }?: Config): ESLintConfig;
export declare function extendConfig({ plugins, settings, rules, extends: _extends, overrides, customRules, ...rest }?: Config): ESLintConfig;
export {};