@eslint/plugin-kit
Advanced tools
| /** | ||
| * @fileoverview Types for the plugin-kit package. | ||
| * @author Nicholas C. Zakas | ||
| */ | ||
| import type { RuleDefinition, RuleDefinitionTypeOptions, RuleVisitor } from "@eslint/core"; | ||
| /** | ||
| * Defaults for non-language-related `RuleDefinition` options. | ||
| */ | ||
| export interface CustomRuleTypeDefinitions { | ||
| RuleOptions: unknown[]; | ||
| MessageIds: string; | ||
| ExtRuleDocs: Record<string, unknown>; | ||
| } | ||
| /** | ||
| * A helper type to define language specific specializations of the `RuleDefinition` type. | ||
| * | ||
| * @example | ||
| * ```ts | ||
| * type YourRuleDefinition< | ||
| * Options extends Partial<CustomRuleTypeDefinitions> = {}, | ||
| * > = CustomRuleDefinitionType< | ||
| * { | ||
| * LangOptions: YourLanguageOptions; | ||
| * Code: YourSourceCode; | ||
| * Visitor: YourRuleVisitor; | ||
| * Node: YourNode; | ||
| * }, | ||
| * Options | ||
| * >; | ||
| * ``` | ||
| */ | ||
| export type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = RuleDefinition<LanguageSpecificOptions & Required<Options & Omit<CustomRuleTypeDefinitions, keyof Options>>>; | ||
| /** | ||
| * Adds matching `:exit` selector properties for each key of a `RuleVisitor`. | ||
| */ | ||
| export type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = { | ||
| [Key in keyof RuleVisitorType as Key | `${Key & string}:exit`]: RuleVisitorType[Key]; | ||
| }; | ||
| /** | ||
| * A map of names to string values, or `null` when no value is provided. | ||
| */ | ||
| export type StringConfig = Record<string, string | null>; | ||
| /** | ||
| * A map of names to boolean flags. | ||
| */ | ||
| export type BooleanConfig = Record<string, boolean>; |
+2
-2
| { | ||
| "name": "@eslint/plugin-kit", | ||
| "version": "0.7.1", | ||
| "version": "0.7.2", | ||
| "description": "Utilities for building ESLint plugins.", | ||
@@ -36,3 +36,3 @@ "author": "Nicholas C. Zakas", | ||
| "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", | ||
| "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", | ||
| "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts && node -e \"fs.cpSync('dist/esm/types.d.ts', 'dist/cjs/types.d.cts')\"", | ||
| "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts", | ||
@@ -39,0 +39,0 @@ "lint:types": "attw --pack", |
+1
-1
@@ -269,3 +269,3 @@ # ESLint Plugin Kit | ||
| <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/d472863/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3> | ||
| <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://opensource.sap.com"><img src="https://avatars.githubusercontent.com/u/2531208" alt="SAP" height="32"></a> <a href="https://www.crawljobs.com/"><img src="https://images.opencollective.com/crawljobs-poland/fa43a17/logo.png" alt="CrawlJobs" height="32"></a> <a href="#"><img src="https://images.opencollective.com/aeriusventilations-org/avatar.png" alt="aeriusventilation's Org" height="32"></a> <a href="https://depot.dev"><img src="https://images.opencollective.com/depot/39125a1/logo.png" alt="Depot" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="TestMu AI Open Source Office (Formerly LambdaTest)" height="32"></a></p> | ||
| <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://opensource.sap.com"><img src="https://avatars.githubusercontent.com/u/2531208" alt="SAP" height="32"></a> <a href="https://www.crawljobs.com/"><img src="https://images.opencollective.com/crawljobs-poland/fa43a17/logo.png" alt="CrawlJobs" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://depot.dev"><img src="https://images.opencollective.com/depot/39125a1/logo.png" alt="Depot" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://citadel.co.jp"><img src="https://avatars.githubusercontent.com/u/75781367" alt="Citadel AI" height="32"></a></p> | ||
| <h3>Technology Sponsors</h3> | ||
@@ -272,0 +272,0 @@ Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. |
109751
1.46%11
10%