Skip to content

Commit 5515367

Browse files
committed
fix(): fix recommend type
1 parent 1a6b7ca commit 5515367

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scripts/lib/rules.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { readdirSync } from 'fs';
22
import { join, resolve } from 'path';
33
import { pluginId } from './plugin-id';
4+
import { RuleRecommendation } from '@typescript-eslint/utils/dist/ts-eslint/Rule';
45

56
const rootDir = resolve(__dirname, '../../src/rules/');
67

@@ -10,7 +11,7 @@ export type RuleInfo = {
1011
name: string;
1112
category: string;
1213
description: string;
13-
recommended: boolean;
14+
recommended: RuleRecommendation;
1415
deprecated: boolean;
1516
fixable: boolean;
1617
replacedBy: string[];

scripts/lib/update-docs-headers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const listFormatter = new Intl.ListFormat('en', { type: 'conjunction' });
3030
function renderHeader(rule: RuleInfo): string {
3131
const lines = [`# ${rule.id}`, `> ${rule.description}`];
3232

33-
if (rule.recommended) {
33+
if (rule.recommended === 'recommended') {
3434
lines.push(
3535
`> - ⭐️ This rule is included in \`plugin:${pluginId}/recommended\` preset.`
3636
);

0 commit comments

Comments
 (0)