-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
C-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Description
Given the following file (.oxlintrc.json):
{
"rules": {
"no-negated-condition": "allow"
}
}If I run the command oxlint -c .oxlintrc.json -D pedantic I get the following output:
× eslint-plugin-unicorn(no-negated-condition): Unexpected negated condition.
╭─[src/systems/dx/index.ts:123:25]
122 │ selectorValue:
123 │ part.groups.selval !== undefined ? Number.parseInt(part.groups.selval, 10) : undefined,
· ────────────────────────────────
124 │ status: Status.PendingRoll,
╰────
help: Remove the negation operator and switch the consequent and alternate branches.
If I run it with oxlint -c .oxlintrc.json -D pedantic -A no-negated-condition however, the error no longer appears.
The same is true in the other direction, removing the -D pedantic and setting the rule to deny instead of allow in the config file does not make the error appear, whereas adding -D no-negated-condition to the command line does make it appear.
This behavior is not present for eslint and import rules (e.g. no-ternary works correctly in the config file), I've so far only seen the bug with the unicorn set of rules, but I haven't tested all of them.
tested on 0.7.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory - BugCategory - Buggood first issueExperience Level - Good for newcomersExperience Level - Good for newcomers
Type
Fields
Give feedbackPriority
None yet