Lint project JavaScript and TypeScript assets using oxlint via NIF.
mix volt.lintScans all .js, .ts, .jsx, .tsx files under the configured
:root directory (default: assets/).
Options
--plugin— enable an oxlint plugin (repeatable), such asreact,unicorn, orjsx-a11y. Accepts the plugin names of an oxlint config file.--fix— show fix suggestions in output
Configuration
Configure lint settings in config :volt, :lint:
config :volt, :lint,
plugins: ["typescript", "react"],
rules: %{
"no-console" => :warn,
"eqeqeq" => :deny,
"typescript/no-explicit-any" => :warn
},
custom_rules: [
{MyApp.NoConsoleLog, :warn}
],
overrides: [
%{
files: ["colocated/**/*.js"],
rules: %{"unicorn/filename-case" => :allow}
}
]Overrides are relative to the lint root and apply in order. They merge
individual :rules, :env, and :globals entries; later matches win.
Both lint commands share these settings. Plugins remain run-wide.