chore
This commit is contained in:
24
dist/index.d.ts
vendored
24
dist/index.d.ts
vendored
@ -1,12 +1,19 @@
|
||||
// Generated by dts-bundle-generator v9.4.0
|
||||
|
||||
import { ESLintConfig, Rules } from '@aet/eslint-define-config';
|
||||
import { ESLintConfig, KnownExtends, Rules, Settings } from '@aet/eslint-define-config';
|
||||
import { ESLintUtils } from '@typescript-eslint/utils';
|
||||
import { Rule } from 'eslint';
|
||||
import { Merge, SetRequired } from 'type-fest';
|
||||
|
||||
export declare const error = "error";
|
||||
export declare const warn = "warn";
|
||||
export declare const off = "off";
|
||||
export declare const graphql: Middleware;
|
||||
export declare const jsdoc: Middleware;
|
||||
export declare const storybook: Middleware;
|
||||
export declare const react: Middleware;
|
||||
export declare const reactRefresh: Middleware;
|
||||
export declare const tailwind: Middleware;
|
||||
export type RuleLevel = "error" | "warn" | "off" | 0 | 1 | 2;
|
||||
export type RuleEntry<Options> = RuleLevel | [
|
||||
RuleLevel,
|
||||
@ -32,6 +39,7 @@ export interface CustomRule {
|
||||
}>;
|
||||
options?: RuleLevel;
|
||||
}
|
||||
export type Middleware = (config: MiddlewareConfig, helpers: MiddlewareFunctions) => void;
|
||||
/**
|
||||
* ESLint Configuration.
|
||||
* @see [ESLint Configuration](https://eslint.org/docs/latest/user-guide/configuring/)
|
||||
@ -53,6 +61,16 @@ export type InputConfig = Omit<ESLintConfig, "rules"> & {
|
||||
*/
|
||||
auto?: boolean;
|
||||
};
|
||||
export type OptionalObjectKey<T> = Exclude<{
|
||||
[Key in keyof T]: undefined | any[] extends T[Key] ? Key : undefined | Record<any, any> extends T[Key] ? Key : never;
|
||||
}[keyof T], undefined>;
|
||||
export type MiddlewareConfig = Merge<SetRequired<ESLintConfig, OptionalObjectKey<ESLintConfig>>, {
|
||||
extends: KnownExtends[];
|
||||
}>;
|
||||
export interface MiddlewareFunctions {
|
||||
addRules(rules: Partial<RuleOptions>): void;
|
||||
addSettings(settings: Partial<Settings>): void;
|
||||
}
|
||||
/**
|
||||
* Returns a ESLint config object.
|
||||
*
|
||||
@ -72,6 +90,8 @@ export type InputConfig = Omit<ESLintConfig, "rules"> & {
|
||||
* Non bundled:
|
||||
* 1. [`graphql`](https://the-guild.dev/graphql/eslint/rules)
|
||||
*/
|
||||
export declare function extendConfig(of?: InputConfig): ESLintConfig;
|
||||
export declare function extendConfig(of?: InputConfig & {
|
||||
middlewares: Middleware[];
|
||||
}): ESLintConfig;
|
||||
|
||||
export {};
|
||||
|
Reference in New Issue
Block a user