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

🐛 rome check and rome ci do not report unorganized imports #4300

Closed
1 task done
Conaclos opened this issue Mar 15, 2023 · 1 comment · Fixed by #4305
Closed
1 task done

🐛 rome check and rome ci do not report unorganized imports #4300

Conaclos opened this issue Mar 15, 2023 · 1 comment · Fixed by #4305
Assignees
Labels
S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@Conaclos
Copy link
Contributor

Environment information

CLI:
  Version:              11.0.0-nightly.846c15e
  Color support:        true

Platform:
  CPU Architecture:     x86_64
  OS:                   linux

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 "xterm-256color"
  JS_RUNTIME_VERSION:   "v18.12.0"
  JS_RUNTIME_NAME:      "node"
  NODE_PACKAGE_MANAGER: "npm/8.19.2"

Rome Configuration:
  Status:               Loaded successfully
  Formatter disabled:   true
  Linter disabled:      false

Workspace:
  Open Documents:       0

What happened?

Given the following code:

// index.js
import b, { B } from 'b';
import a, { A } from 'a';

and rome.json:

{
  "organizeImports": {
    "enabled": true
  }
}

rome ci index.js and rome check index.js do not error on the unorganized imports.
I also tested rome ci --organize-imports-enabled=true index.js.

Important note: rome check --apply-unsafe index.js organizes imports. Thus Rome takes the configuration into account!

Expected result

Running rome check or rome ci should error when unorganized imports are found.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@Conaclos Conaclos added S-To triage Status: user report of a possible bug that needs to be triaged S-Bug: confirmed Status: report has been confirmed as a valid bug and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Mar 15, 2023
@ematipico ematipico self-assigned this Mar 15, 2023
@ematipico
Copy link
Contributor

Good catch @Conaclos
This feature needs more architectural work. That was an oversight from by end.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

2 participants