Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New: Add ESLint#getRulesMetaForResults() (refs #13654)#14716

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

Merged
btmills merged 3 commits intomasterfromissue13654-b
Jun 18, 2021

Conversation

nzakas
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[x] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Added theESLint#getRulesMetaForResults() method. This method was proposed asESLint#getRulesMetaForReport() but that wording was incorrect in theRFC because it'sCLIEngine that return a report whileESLint returns an array of results, so I updated the name to match that reality.,

I chose to return an object so that therulesMeta passed to formatters is the same format rather than returning a map.

This part of the RFC is non-breaking, which is why I chose to create a separate PR for it.

Is there anything you'd like reviewers to focus on?

Does this implementation match everyone's expectations?

@nzakasnzakas added enhancementThis change enhances an existing feature of ESLint coreRelates to ESLint's core APIs and features acceptedThere is consensus among the team that this change meets the criteria for inclusion labelsJun 16, 2021
@nzakasnzakas linked an issueJun 17, 2021 that may beclosed by this pull request
Copy link
Member

@mdjermanovicmdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM aside from the comments about the documentation.

Does this implementation match everyone's expectations?

I'd guess this covers all use cases whereCLIEngine#getRules() was used, but can't be sure.

Assuming that it covers all use cases, I think it makes sense to require theresults argument, as it clarifies this method and emphasizes that it should be called afterESLint#lintFiles()/ESLint#lintText().

@nzakas
Copy link
MemberAuthor

Docs have been updated. I think betweenuse-at-your-own-riskbuiltinRules and this method, we are covering the majority of cases. We can always look at adding more methods if we find a gap.

Copy link
Member

@btmillsbtmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM. Just one fix to the docs, and I'll commit that inline if you don't see it by the time I'm ready to do the release so it can go out today.

Co-authored-by: Brandon Mills <btmills@users.noreply.github.com>
@btmillsbtmills merged commitc2cd7b4 intomasterJun 18, 2021
@btmillsbtmills deleted the issue13654-b branchJune 18, 2021 19:57
@eslint-github-boteslint-github-botbot locked and limited conversation to collaboratorsDec 16, 2021
@eslint-github-boteslint-github-botbot added the archived due to ageThis issue has been archived; please open a new issue for any further discussion labelDec 16, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@btmillsbtmillsbtmills approved these changes

@mdjermanovicmdjermanovicmdjermanovic approved these changes

Assignees
No one assigned
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussioncoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLint
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Breaking: define anexports field for our public API
3 participants
@nzakas@btmills@mdjermanovic

[8]ページ先頭

©2009-2025 Movatter.jp