Skip to content

Automatic fixes

Oxlint can automatically fix some lint violations. Automatic fixes are only applied when passing the relevant CLI flags. You choose when to apply them.

In code editor integrations (such as VS Code, Zed, etc.), automatic fixes are exposed as "code actions" that you can apply in-editor.

You can see all rules which have fixers in the rules list.

Safe fixes

Safe fixes are changes that do not alter program behavior.

Apply safe fixes:

bash
oxlint --fix
``````bash
oxlint --fix-suggestions
``````bash
oxlint --fix-dangerously
``````bash
oxlint --fix --fix-suggestions
``````bash
oxlint --fix --fix-suggestions --fix-dangerously
``````bash
oxlint --type-aware --fix