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

🐛 rome check with --apply-suggested should error when there are remaining issues after applying fixes #4156

Closed
1 task done
mcmxcdev opened this issue Jan 16, 2023 · 2 comments · Fixed by #4270
Closed
1 task done
Labels
S-To triage Status: user report of a possible bug that needs to be triaged

Comments

@mcmxcdev
Copy link

Environment information

CLI:
  Version:              11.0.0
  Color support:        true

Platform:
  CPU Architecture:     x86_64
  OS:                   linux

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 "xterm-256color"

Rome Configuration:
  Status:               loaded
  Formatter disabled:   false
  Linter disabled:      false

Workspace:
  Open Documents:       0

What happened?

  1. run pnpm rome check . with faulty code and command fails as expected
  2. run pnpm rome check . --apply-suggested with faulty code but it passes unexpectedly

Expected result

pnpm rome check . --apply-suggested should exit with faulty code same like eslint --fix does.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@mcmxcdev mcmxcdev added the S-To triage Status: user report of a possible bug that needs to be triaged label Jan 16, 2023
@github-actions
Copy link

👋 @rome/staff please triage this issue by adding one of the following labels: S-Bug: confirmed, S-Planned , S-Wishlist or umbrella

@valtlai
Copy link

valtlai commented Mar 6, 2023

This issue also applies to --apply.

Currently I use the following as a work-around when using lint-staged:

"lint-staged": {
  "*.js": [
    "rome check --apply",
    "rome check"
  ]
}

The first command applies the autofixes and the second one displays the remaining issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-To triage Status: user report of a possible bug that needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants