-
-
Notifications
You must be signed in to change notification settings - Fork 725
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
1.29.0
What command did you run?
oxlint --type-aware --config linter/eslint/sort-imports/allowSeparatedGroups/.oxlintrc.json linter/eslint/sort-imports/allowSeparatedGroups
What does your .oxlintrc.json config file look like?
What happened?
Checkout this file or visit this repo https://github.com/ryansuhartanto/oxc-issues/blob/main/linter/eslint/sort-imports/allowSeparatedGroups/fail.ts:
// oxlint-disable no-unused-vars
import { format } from "oxfmt";
import { defineRule } from "oxlint";This snippet will throw this error:
> oxc-issues@ lint /home/nexus/Dokumen/suhartanto/VCS/oxc-issues
> oxlint --type-aware --config linter/eslint/sort-imports/allowSeparatedGroups/.oxlintrc.json linter/eslint/sort-imports/allowSeparatedGroups
× eslint(sort-imports): Imports should be sorted alphabetically.
╭─[linter/eslint/sort-imports/allowSeparatedGroups/fail.ts:4:1]
3 │
4 │ import { defineRule } from "oxlint";
· ────────────────────────────────────
╰────
Found 0 warnings and 1 error.
Finished in 105ms on 2 files with 53 rules using 8 threads.
ELIFECYCLE Command failed with exit code 1.
Whereas this file will pass (note the extra empty line):
// oxlint-disable no-unused-vars
import { format } from "oxfmt";
import { defineRule } from "oxlint";Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
{ "plugins": [ "eslint" ], "rules": { "eslint/sort-imports": [ "error", { "allowSeparatedGroups": true } ], } }