Skip to content
Merged
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
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ declare module '@typescript-eslint/experimental-utils/dist/ts-eslint/Rule' {
export interface RuleMetaDataDocs {
suggestion?: boolean;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export interface RuleMetaData<TMessageIds extends string> {
hasSuggestion?: boolean;
}
}

// copied from https://github.com/babel/babel/blob/d8da63c929f2d28c401571e2a43166678c555bc4/packages/babel-helpers/src/helpers.js#L602-L606
Expand Down
1 change: 1 addition & 0 deletions src/rules/no-done-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestion: true,
},
defaultOptions: [],
create(context) {
Expand Down
1 change: 1 addition & 0 deletions src/rules/no-focused-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default createRule({
},
schema: [],
type: 'suggestion',
hasSuggestion: true,
},
defaultOptions: [],
create: context => ({
Expand Down
1 change: 1 addition & 0 deletions src/rules/prefer-expect-assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default createRule<[RuleOptions], MessageIds>({
suggestRemovingExtraArguments: 'Remove extra arguments',
},
type: 'suggestion',
hasSuggestion: true,
schema: [
{
type: 'object',
Expand Down
1 change: 1 addition & 0 deletions src/rules/prefer-strict-equal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default createRule({
},
type: 'suggestion',
schema: [],
hasSuggestion: true,
},
defaultOptions: [],
create(context) {
Expand Down
2 changes: 1 addition & 1 deletion tools/regenerate-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const details: RuleDetails[] = Object.keys(config.configs.all.rules)
description: rule.meta.docs.description,
fixable: rule.meta.fixable
? 'fixable'
: rule.meta.docs.suggestion
: rule.meta.hasSuggestion
? 'suggest'
: false,
requiresTypeChecking: rule.meta.docs.requiresTypeChecking ?? false,
Expand Down