Update
This commit is contained in:
22
dist/index.d.ts
vendored
22
dist/index.d.ts
vendored
@ -5,6 +5,17 @@ import { ESLintUtils } from '@typescript-eslint/utils';
|
||||
import { Rule } from 'eslint';
|
||||
import { Merge, SetRequired } from 'type-fest';
|
||||
|
||||
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;
|
||||
}
|
||||
export type Middleware = (config: MiddlewareConfig, helpers: MiddlewareFunctions) => void;
|
||||
export declare const error = "error";
|
||||
export declare const warn = "warn";
|
||||
export declare const off = "off";
|
||||
@ -39,7 +50,6 @@ 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/)
|
||||
@ -62,16 +72,6 @@ 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.
|
||||
*
|
||||
|
2
dist/package.json
vendored
2
dist/package.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@aet/eslint-rules",
|
||||
"version": "1.0.1-beta.16",
|
||||
"version": "1.0.1-beta.18",
|
||||
"license": "UNLICENSED",
|
||||
"bin": {
|
||||
"eslint-install": "install.js",
|
||||
|
Reference in New Issue
Block a user