What version of Oxlint are you using?
0.15.6
What command did you run?
oxlint -c .oxlintrc.json default-param-last-optional.ts
What does your .oxlint.json config file look like?
{
"rules": {
"default-param-last": "error"
}
}
What happened?
In Typescript files, optional parameters should be allowed after default ones.
According to #2180 the rule is implemented, however doesn't support the TS only exception.
Not sure if this should be classed as bug report or feature request.
See https://typescript-eslint.io/rules/default-param-last.
Code
function fn(a: string = 'a', b?: string) {
console.log(a, b);
}
fn('b');
oxlint output
❯ oxlint -c .oxlintrc.json default-param-last-optional.ts
× eslint(default-param-last): Default parameters should be last
╭─[default-param-last-optional.ts:1:13]
1 │ function fn(a: string = 'a', b?: string) {
· ───────────────
2 │ console.log(a, b);
╰────
help: Enforce default parameters to be last.
Finished in 4ms on 1 file with 99 rules using 8 threads.
Found 0 warnings and 1 error.
What version of Oxlint are you using?
0.15.6
What command did you run?
oxlint -c .oxlintrc.json default-param-last-optional.tsWhat does your
.oxlint.jsonconfig file look like?{ "rules": { "default-param-last": "error" } }What happened?
In Typescript files, optional parameters should be allowed after default ones.
According to #2180 the rule is implemented, however doesn't support the TS only exception.
Not sure if this should be classed as bug report or feature request.
See https://typescript-eslint.io/rules/default-param-last.
Code
oxlintoutput