-
Notifications
You must be signed in to change notification settings - Fork 5
NEW: @W-15884468@: Implement eslint engine's describeRules method #37
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3708768
to
3243432
Compare
} | ||
} | ||
|
||
function toSeverityLevel(metadata: Rule.RuleMetaData, status: ESLintRuleStatus | undefined): SeverityLevel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has some convoluted matching logic here. Would really help to have some comments as to why we are doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure... will do. Note that our eslint engine design doc contains more info: https://docs.google.com/document/d/13M9nhS4tkhendq-9mRelnqP_rGU322mP7X0Ncxu-7Fs/edit#heading=h.uvab9trr4ep7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, added in comments.
return this.ruleStatuses; | ||
} | ||
|
||
private async calculateRuleStatusesFor(files: string[], legacyESLint: ESLint): Promise<Map<string, ESLintRuleStatus>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be the only method that changes with eslint 9? I'm trying to understand how much of this would change with config changes in eslint 9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new flat config files (also available in eslint 8) will indeed require us to use the loadESLint utility to get a new ESLint constructor that is for flat configuration files. Therefore we will need to:
- Construct our base configs off of the new flat config structure
- Construct the ESLint instance from loadESLint instead of manually constructing the legacy one
- And the biggest one will be... in order to get metadata for the rules, we'll need to import and process all of the users configuration files and the import and process all of the plugin modules that we find along the way to get access to the rule metadata.
8a88f99
to
8854cf2
Compare
1621120
to
ebe79f7
Compare
93d8855
to
cad18ad
Compare
cad18ad
to
0e0f79f
Compare
No description provided.