Skip to content
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

Breaking: disallow SourceCode#getComments() in RuleTester (refs #14744) #14769

Merged
merged 2 commits into from Aug 5, 2021

Conversation

mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Jul 5, 2021

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
[ ] Add something to the core
[x] Other, please explain:

refs #14744

Updates RuleTester to throw an error on any usage of SourceCode#getComments().

What changes did you make? (Give an overview)

RuleTester will replace SourceCode.prototype.getComments with a function that throws an error.

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

@mdjermanovic mdjermanovic added core Relates to ESLint's core APIs and features breaking This change is backwards-incompatible evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jul 5, 2021
@mdjermanovic
Copy link
Member Author

mdjermanovic commented Jul 5, 2021

CI will be fixed by #14771

btmills
btmills approved these changes Jul 6, 2021
@btmills btmills added this to Pull Request Opened in v8.0.0 Jul 6, 2021
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jul 6, 2021
@mdjermanovic
Copy link
Member Author

mdjermanovic commented Jul 6, 2021

Closing-reopening to run checks on top of the now-fixed latest master.

nzakas
nzakas approved these changes Jul 15, 2021
Copy link
Member

@nzakas nzakas left a comment

Just one suggestion to clarify the error message.

lib/rule-tester/rule-tester.js Outdated Show resolved Hide resolved
Co-authored-by: Nicholas C. Zakas <nicholas@nczconsulting.com>
@nzakas nzakas moved this from Pull Request Opened to Ready for Merge in v8.0.0 Jul 15, 2021
@nzakas nzakas linked an issue Aug 5, 2021 that may be closed by this pull request
@nzakas nzakas merged commit 86d31a4 into master Aug 5, 2021
14 checks passed
v8.0.0 automation moved this from Ready for Merge to Done Aug 5, 2021
@nzakas nzakas deleted the issue14744-ruletester branch Aug 5, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Feb 2, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion breaking This change is backwards-incompatible core Relates to ESLint's core APIs and features
Projects
v8.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

Remove SourceCode#getComments()
3 participants