What version of Oxlint are you using?
1.36.0
What command did you run?
oxlint --disable-nested-config
What does your .oxlintrc.json config file look like?
plugin.ts:
// oxlint-disable typescript/restrict-template-expressions
import type { Plugin } from "#oxlint";
const plugin: Plugin = {
meta: {
name: "utf16-plugin",
},
rules: {
"no-debugger": {
create(context) {
return {
Program(program) {
context.report({
message:
"program:\n" +
`start/end: [${program.start},${program.end}]\n` +
`range: [${program.range}]\n` +
`loc: [${JSON.stringify(program.loc)}]`,
node: program,
});
},
DebuggerStatement(debuggerStatement) {
context.report({
message:
"debugger:\n" +
`start/end: [${debuggerStatement.start},${debuggerStatement.end}]\n` +
`range: [${debuggerStatement.range}]\n` +
`loc: [${JSON.stringify(debuggerStatement.loc)}]`,
node: debuggerStatement,
});
},
};
},
},
},
};
export default plugin;
index.js:
debugger;
// £
debugger;
// 🤨
{
debugger;
}
What happened?
See also: #17517
I get logging like this at the end of the rule run, where I have "0 rules" but I do have errors thanks to the JS Plugins I've enabled:
Found 0 warnings and 4 errors.
Finished in 50ms on 1 file with 0 rules using 12 threads.
the config_store.rs has a number_of_rules method which should be updated to include the JS plugin rules in the count:
|
pub fn number_of_rules(&self, type_aware_enabled: bool) -> Option<usize> { |
What version of Oxlint are you using?
1.36.0
What command did you run?
oxlint --disable-nested-configWhat does your
.oxlintrc.jsonconfig file look like?{ "categories": { "correctness": "off" }, "jsPlugins": ["./plugin.ts"], "rules": { "utf16-plugin/no-debugger": "error" } }plugin.ts:
index.js:What happened?
See also: #17517
I get logging like this at the end of the rule run, where I have "0 rules" but I do have errors thanks to the JS Plugins I've enabled:
the config_store.rs has a
number_of_rulesmethod which should be updated to include the JS plugin rules in the count:oxc/crates/oxc_linter/src/config/config_store.rs
Line 299 in 5b15708