Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

馃悰 false positive for noShoutyConstants on empty strings #3867

Closed
1 task done
rosslh opened this issue Nov 26, 2022 · 0 comments 路 Fixed by #3868
Closed
1 task done

馃悰 false positive for noShoutyConstants on empty strings #3867

rosslh opened this issue Nov 26, 2022 · 0 comments 路 Fixed by #3868
Labels
A-Linter Area: linter L-JavaScript Langauge: JavaScript S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@rosslh
Copy link
Contributor

rosslh commented Nov 26, 2022

Environment information

According https://rome.tools/docs/lint/rules/noShoutyConstants/

Disallow the use of constants which its value is the upper-case version of its name.

Such code snippet should not emit a warning:

const A = ""

https://docs.rome.tools/playground/?code=YwBvAG4AcwB0ACAAQQAgAD0AIAAiACIACgBjAG8AbgBzAHQAIABCACAAPQAgAEEA&typescript=false&jsx=false

If it's alright, I'd like to take this issue on and open a PR.

What happened?

Rome emitted a diagnostic.

Expected result

This code snippet will not raise an error.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@rosslh rosslh added the S-To triage Status: user report of a possible bug that needs to be triaged label Nov 26, 2022
rosslh added a commit to rosslh/tools that referenced this issue Nov 26, 2022
@MichaReiser MichaReiser added S-Bug: confirmed Status: report has been confirmed as a valid bug A-Linter Area: linter S-To triage Status: user report of a possible bug that needs to be triaged and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Nov 26, 2022
@MichaReiser MichaReiser added this to the 11.0.0 milestone Nov 28, 2022
@MichaReiser MichaReiser added the L-JavaScript Langauge: JavaScript label Nov 28, 2022
@ematipico ematipico removed the S-To triage Status: user report of a possible bug that needs to be triaged label Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter L-JavaScript Langauge: JavaScript S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants