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 {};
|
||||
|
6
dist/package.json
vendored
6
dist/package.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@aet/eslint-rules",
|
||||
"version": "1.0.1-beta.10",
|
||||
"version": "1.0.1-beta.11",
|
||||
"license": "UNLICENSED",
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0",
|
||||
@ -8,7 +8,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@nolyfill/is-core-module": "^1.0.39",
|
||||
"@aet/eslint-define-config": "0.1.0-beta.10",
|
||||
"@aet/eslint-define-config": "^0.1.0-beta.15",
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@tanstack/eslint-plugin-query": "^5.51.15",
|
||||
"@types/eslint": "^8.56.11",
|
||||
@ -60,4 +60,4 @@
|
||||
"supports-preserve-symlinks-flag": "file:./overrides/supports-preserve-symlinks-flag"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user