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

🐛 rome format shouldn't emit lint warnings #2670

Closed
1 task done
MichaReiser opened this issue Jun 7, 2022 · 1 comment · Fixed by #2680
Closed
1 task done

🐛 rome format shouldn't emit lint warnings #2670

MichaReiser opened this issue Jun 7, 2022 · 1 comment · Fixed by #2680
Assignees
Labels
A-CLI Area: CLI I-Easy Implementation: easy task, usually a good fit for new contributors S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@MichaReiser
Copy link
Contributor

MichaReiser commented Jun 7, 2022

Environment information

Version: 0.6.0 

Command: `rome format` inside of the `website` folder

What happened?

  1. Change the === to a == in
    disabled={sourceType === SourceType.Script}
  2. Run cargo run -p rome_cli -- format src/ inside the playground folder
  3. It emits
warning[noDoubleEquals]: Do not use the == operator
   ┌─ src/SourceTypeSelect.tsx:64:29
   │
64 │                             disabled={sourceType == SourceType.Script}
   │                                                  -- Do not use the == operator

Replace with strict equality
      | @@ -61,7 +61,7 @@
60 60 |                                                                 setIsTypeScript(e.target.checked);
61 61 |                                                         }}
62 62 |                                                         className="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded disabled:opacity-30"
63    | -                                                       disabled={sourceType == SourceType.Script}
   63 | +                                                       disabled={sourceType === SourceType.Script}
64 64 |                                                 />
65 65 |                                         </div>
66 66 |                                         <div className="ml-1 text-sm">

Expected result

rome format only prints syntax errors but not lint warnings/errors.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@MichaReiser MichaReiser added the S-To triage Status: user report of a possible bug that needs to be triaged label Jun 7, 2022
@MichaReiser
Copy link
Contributor Author

@leops assigning this to you as you worked on this

@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug A-CLI Area: CLI I-Easy Implementation: easy task, usually a good fit for new contributors and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Jun 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-CLI Area: CLI I-Easy Implementation: easy task, usually a good fit for new contributors S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants