Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/rule-doc-notices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ function getNoticesForRule(

[NOTICE_TYPE.OPTIONS]: hasOptions(rule.meta?.schema),
[NOTICE_TYPE.REQUIRES_TYPE_CHECKING]:
// @ts-expect-error -- TODO: requiresTypeChecking type not present
(rule.meta?.docs?.requiresTypeChecking as boolean | undefined) || false,
rule.meta?.docs?.requiresTypeChecking ?? false,
[NOTICE_TYPE.TYPE]: Boolean(rule.meta?.type),
};

Expand Down
1 change: 0 additions & 1 deletion lib/rule-list-columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export function getColumns(
hasOptions(rule.meta?.schema),
),
[COLUMN_TYPE.REQUIRES_TYPE_CHECKING]: ruleNamesAndRules.some(
// @ts-expect-error -- TODO: requiresTypeChecking type not present
([, rule]) => rule.meta?.docs?.requiresTypeChecking,
),
// Show type column only if we found at least one rule with a standard type.
Expand Down
1 change: 0 additions & 1 deletion lib/rule-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ function buildRuleRow(
return getLinkToRule(context, ruleName, pathToFile, false, false);
},
[COLUMN_TYPE.OPTIONS]: hasOptions(rule.meta?.schema) ? EMOJI_OPTIONS : '',
// @ts-expect-error -- TODO: requiresTypeChecking type not present
[COLUMN_TYPE.REQUIRES_TYPE_CHECKING]: rule.meta?.docs?.requiresTypeChecking
? EMOJI_REQUIRES_TYPE_CHECKING
: '',
Expand Down
8 changes: 7 additions & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import type { ConfigFormat } from './config-format.js';

// Standard ESLint types.

export type RuleModule = TSESLint.RuleModule<string, readonly unknown[]>;
export type RuleModule = TSESLint.RuleModule<
string,
readonly unknown[],
// `requiresTypeChecking` is a common convention in the ESLint ecosystem but
// isn't part of the standard `RuleMetaDataDocs` type, so we augment it here.
{ requiresTypeChecking?: boolean }
>;

export type Rules = TSESLint.Linter.RulesRecord;

Expand Down
Loading