Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx oxlint -c .oxlintrc.json not working #5400

Closed
RabbitShare opened this issue Sep 2, 2024 · 3 comments
Closed

npx oxlint -c .oxlintrc.json not working #5400

RabbitShare opened this issue Sep 2, 2024 · 3 comments
Assignees
Labels
A-linter Area - Linter C-bug Category - Bug X-wontfix Close Reason - wontfix

Comments

@RabbitShare
Copy link

oxlint not working with .oxlintrc.json config.

Command npx oxlint -c .oxlintrc.json not found any cycle

Config example:

{
  "rules": {
    "import/no-cycle": "error"
  }
}

npx oxlint --import-plugin -A all -D no-cycle working fine

npx oxlint --import-plugin -A all -D no-cycle                                                                             

  × eslint-plugin-import(no-cycle): Dependency cycle detected
   ╭─[src/test.ts:1:23]
 1 │ import { test2 } from "./App";
   ·                       ───────
 2 │ 
   ╰────
  help: These paths form a cycle:
        -> ./App - src/App.tsx
        -> ./test - src/test.ts

  × eslint-plugin-import(no-cycle): Dependency cycle detected
   ╭─[src/App.tsx:4:22]
 3 │ import "./App.css";
 4 │ import { test } from "./test";
   ·                      ────────
 5 │ console.log(test());
   ╰────
  help: These paths form a cycle:
        -> ./test - src/test.ts
        -> ./App - src/App.tsx

Finished in 8ms on 5 files with 1 rules using 10 threads.
Found 0 warnings and 2 errors.
@RabbitShare RabbitShare added the C-bug Category - Bug label Sep 2, 2024
@Boshen
Copy link
Member

Boshen commented Sep 2, 2024

Try npx oxlint -c .oxlintrc.json --import-plugin


@DonIsaac It seems unintuitive that --import-plugin needs to be supplied here along with -c 🤔

@DonIsaac
Copy link
Contributor

DonIsaac commented Sep 2, 2024

I agree, having plugins enabled in configs will assuage this.

@DonIsaac DonIsaac added X-wontfix Close Reason - wontfix A-linter Area - Linter labels Sep 2, 2024
@Boshen
Copy link
Member

Boshen commented Sep 3, 2024

Let's improve the documentation a little bit before closing.

@Boshen Boshen added this to the Oxlint Beta Milestone milestone Sep 9, 2024
@Boshen Boshen self-assigned this Sep 9, 2024
@Boshen Boshen closed this as completed in 64f9575 Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-bug Category - Bug X-wontfix Close Reason - wontfix
Projects
None yet
Development

No branches or pull requests

3 participants