@eslint/plugin-kit
Advanced tools
+12
-1
@@ -269,5 +269,16 @@ 'use strict'; | ||
| /** | ||
| * @typedef {import("@eslint/core").TextSourceCode<Options>} TextSourceCode<Options> | ||
| * @typedef {import("@eslint/core").TextSourceCode<Options>} TextSourceCode | ||
| * @template {SourceCodeBaseTypeOptions} [Options=SourceCodeBaseTypeOptions] | ||
| */ | ||
| /** @typedef {$eslintcore.RuleVisitor} RuleVisitor */ | ||
| /** | ||
| * @typedef {import("./types.ts").CustomRuleVisitorWithExit<RuleVisitorType>} CustomRuleVisitorWithExit | ||
| * @template {RuleVisitor} RuleVisitorType | ||
| */ | ||
| /** @typedef {$typests.CustomRuleTypeDefinitions} CustomRuleTypeDefinitions */ | ||
| /** | ||
| * @typedef {import("./types.ts").CustomRuleDefinitionType<LanguageSpecificOptions, Options>} CustomRuleDefinitionType | ||
| * @template {Omit<import("@eslint/core").RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>} LanguageSpecificOptions | ||
| * @template {Partial<CustomRuleTypeDefinitions>} Options | ||
| */ | ||
@@ -274,0 +285,0 @@ //----------------------------------------------------------------------------- |
@@ -10,6 +10,7 @@ export type VisitTraversalStep = $eslintcore.VisitTraversalStep; | ||
| export type SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions; | ||
| /** | ||
| * <Options> | ||
| */ | ||
| export type TextSourceCode<Options extends SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions> = import("@eslint/core").TextSourceCode<Options>; | ||
| export type RuleVisitor = $eslintcore.RuleVisitor; | ||
| export type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = import("./types.cts").CustomRuleVisitorWithExit<RuleVisitorType>; | ||
| export type CustomRuleTypeDefinitions = $typests.CustomRuleTypeDefinitions; | ||
| export type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<import("@eslint/core").RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = import("./types.cts").CustomRuleDefinitionType<LanguageSpecificOptions, Options>; | ||
| export type RuleConfig = $eslintcore.RuleConfig; | ||
@@ -16,0 +17,0 @@ export type RulesConfig = $eslintcore.RulesConfig; |
+74
-0
@@ -6,3 +6,77 @@ /** | ||
| //------------------------------------------------------------------------------ | ||
| // Imports | ||
| //------------------------------------------------------------------------------ | ||
| import type { | ||
| RuleDefinition, | ||
| RuleDefinitionTypeOptions, | ||
| RuleVisitor, | ||
| } from "@eslint/core"; | ||
| //------------------------------------------------------------------------------ | ||
| // Exports | ||
| //------------------------------------------------------------------------------ | ||
| /** | ||
| * 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< | ||
| // Language specific type options (non-configurable) | ||
| LanguageSpecificOptions & | ||
| Required< | ||
| // Rule specific type options (custom) | ||
| Options & | ||
| // Rule specific type options (defaults) | ||
| 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>; |
@@ -10,6 +10,7 @@ export type VisitTraversalStep = $eslintcore.VisitTraversalStep; | ||
| export type SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions; | ||
| /** | ||
| * <Options> | ||
| */ | ||
| export type TextSourceCode<Options extends SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions> = import("@eslint/core").TextSourceCode<Options>; | ||
| export type RuleVisitor = $eslintcore.RuleVisitor; | ||
| export type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = import("./types.ts").CustomRuleVisitorWithExit<RuleVisitorType>; | ||
| export type CustomRuleTypeDefinitions = $typests.CustomRuleTypeDefinitions; | ||
| export type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<import("@eslint/core").RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = import("./types.ts").CustomRuleDefinitionType<LanguageSpecificOptions, Options>; | ||
| export type RuleConfig = $eslintcore.RuleConfig; | ||
@@ -16,0 +17,0 @@ export type RulesConfig = $eslintcore.RulesConfig; |
+12
-1
@@ -268,5 +268,16 @@ // @ts-self-types="./index.d.ts" | ||
| /** | ||
| * @typedef {import("@eslint/core").TextSourceCode<Options>} TextSourceCode<Options> | ||
| * @typedef {import("@eslint/core").TextSourceCode<Options>} TextSourceCode | ||
| * @template {SourceCodeBaseTypeOptions} [Options=SourceCodeBaseTypeOptions] | ||
| */ | ||
| /** @typedef {$eslintcore.RuleVisitor} RuleVisitor */ | ||
| /** | ||
| * @typedef {import("./types.ts").CustomRuleVisitorWithExit<RuleVisitorType>} CustomRuleVisitorWithExit | ||
| * @template {RuleVisitor} RuleVisitorType | ||
| */ | ||
| /** @typedef {$typests.CustomRuleTypeDefinitions} CustomRuleTypeDefinitions */ | ||
| /** | ||
| * @typedef {import("./types.ts").CustomRuleDefinitionType<LanguageSpecificOptions, Options>} CustomRuleDefinitionType | ||
| * @template {Omit<import("@eslint/core").RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>} LanguageSpecificOptions | ||
| * @template {Partial<CustomRuleTypeDefinitions>} Options | ||
| */ | ||
@@ -273,0 +284,0 @@ //----------------------------------------------------------------------------- |
+40
-0
@@ -5,3 +5,43 @@ /** | ||
| */ | ||
| 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>; |
+74
-0
@@ -6,3 +6,77 @@ /** | ||
| //------------------------------------------------------------------------------ | ||
| // Imports | ||
| //------------------------------------------------------------------------------ | ||
| import type { | ||
| RuleDefinition, | ||
| RuleDefinitionTypeOptions, | ||
| RuleVisitor, | ||
| } from "@eslint/core"; | ||
| //------------------------------------------------------------------------------ | ||
| // Exports | ||
| //------------------------------------------------------------------------------ | ||
| /** | ||
| * 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< | ||
| // Language specific type options (non-configurable) | ||
| LanguageSpecificOptions & | ||
| Required< | ||
| // Rule specific type options (custom) | ||
| Options & | ||
| // Rule specific type options (defaults) | ||
| 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.5.1", | ||
| "version": "0.6.0", | ||
| "description": "Utilities for building ESLint plugins.", | ||
@@ -52,3 +52,3 @@ "author": "Nicholas C. Zakas", | ||
| "dependencies": { | ||
| "@eslint/core": "^1.0.1", | ||
| "@eslint/core": "^1.1.0", | ||
| "levn": "^0.4.1" | ||
@@ -55,0 +55,0 @@ }, |
+2
-2
@@ -268,4 +268,4 @@ # ESLint Plugin Kit | ||
| <p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3> | ||
| <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/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://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" 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://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://www.n-ix.com/"><img src="https://images.opencollective.com/n-ix-ltd/575a7a5/logo.png" alt="N-iX Ltd" 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://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" 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="LambdaTest" height="32"></a></p> | ||
| <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://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" 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="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://www.n-ix.com/"><img src="https://images.opencollective.com/n-ix-ltd/575a7a5/logo.png" alt="N-iX Ltd" 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://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" 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="LambdaTest" 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. |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
108396
7.53%1996
7.08%Updated