Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(eslint-plugin): correct rules.d.ts types to not rely on non-existent imports#9339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
2e97705
f08e1e4
ea7cb79
8878dd4
c76814f
b3d2b25
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I don'tlove this copy & pasting of types between files. But we don't publish My preference would be to start publishing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I wonder what if we remove import { ESLintUtils } from '@typescript-eslint/utils';-import type {- RuleModuleWithMetaDocs,- RuleRecommendation,- RuleRecommendationAcrossConfigs,-} from '@typescript-eslint/utils/ts-eslint';--export interface ESLintPluginDocs {- /**- * Does the rule extend (or is it based off of) an ESLint code rule?- * Alternately accepts the name of the base rule, in case the rule has been renamed.- * This is only used for documentation purposes.- */- extendsBaseRule?: boolean | string;-- /**- * If a string config name, which starting config this rule is enabled in.- * If an object, which settings it has enabled in each of those configs.- */- recommended?: RuleRecommendation | RuleRecommendationAcrossConfigs<unknown[]>;-- /**- * Does the rule require us to create a full TypeScript Program in order for it- * to type-check code. This is only used for documentation purposes.- */- requiresTypeChecking?: boolean;-}+import { ESLintPluginDocs } from '../../rules'; export const createRule = ESLintUtils.RuleCreator<ESLintPluginDocs>( name => `https://typescript-eslint.io/rules/${name}`, );-export type ESLintPluginRuleModule = RuleModuleWithMetaDocs<- string,- readonly unknown[],- ESLintPluginDocs->; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I am ... deeply amused at how much better of a solution this is. 😄 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,7 @@ | ||
import { ESLintUtils } from '@typescript-eslint/utils'; | ||
import type { ESLintPluginDocs } from '../../rules'; | ||
export const createRule = ESLintUtils.RuleCreator<ESLintPluginDocs>( | ||
name => `https://typescript-eslint.io/rules/${name}`, | ||
); | ||
Uh oh!
There was an error while loading.Please reload this page.