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

🐛 false positive noShoutyConstants #3077

Closed
1 task done
IWANABETHATGUY opened this issue Aug 17, 2022 · 0 comments · Fixed by #3081
Closed
1 task done

🐛 false positive noShoutyConstants #3077

IWANABETHATGUY opened this issue Aug 17, 2022 · 0 comments · Fixed by #3081
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug
Milestone

Comments

@IWANABETHATGUY
Copy link
Contributor

IWANABETHATGUY commented Aug 17, 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:

let lib = "lib"

https://play.rome.tools/?code=let+lib+%3D+%22lib%22&lineWidth=80&indentStyle=tab&quoteStyle=double&indentWidth=2&sourceType=module&typescript=false&jsx=false#bABlAHQAIABsAGkAYgAgAD0AIAAiAGwAaQBiACIA

What happened?

Rome emit a diagnostic

Expected result

This code snippet will not raise an error.

Also
for such code snippet:

export const CON = 'CON'

don't raise an error, because it is a common pattern for redux and vuex when writing action type.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@IWANABETHATGUY IWANABETHATGUY added the S-To triage Status: user report of a possible bug that needs to be triaged label Aug 17, 2022
@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug A-Linter Area: linter and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Aug 17, 2022
@ematipico ematipico added this to the 0.9.0 milestone Aug 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
Status: Done
2 participants