-
-
Notifications
You must be signed in to change notification settings - Fork 722
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
1.6.0
What command did you run?
oxlint src/index.js
What does your .oxlintrc.json config file look like?
What happened?
Oxlint is reporting false positives:
× eslint(no-empty-function): Unexpected empty function `foo`
╭─[src/index.js:1:19]
1 │ const foo = () => {}
· ──
2 │ function bar() {}
╰────
help: Consider removing this function or adding logic to it.
× eslint(no-empty-function): Unexpected empty function `bar`
╭─[src/index.js:2:16]
1 │ const foo = () => {}
2 │ function bar() {}
· ──
╰────
help: Consider removing this function or adding logic to it.
The config specifies that empty functions and arrow functions are allowed, so there should be no errors.
The options have allegedly been implemented in #10529
The docs list the allow option for this rule as available: https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-empty-function.html
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
{ "$schema": "./node_modules/oxlint/configuration_schema.json", "categories": { "correctness": "off" }, "rules": { "no-empty-function": [ "error", { "allow": ["arrowFunctions", "functions", "methods"] } ], "no-unused-vars": "off" }, "env": { "builtin": true }, "globals": {}, "ignorePatterns": [] }