mix volt.lint (Volt v0.18.0)

Copy Markdown View Source

Lint project JavaScript and TypeScript assets using oxlint via NIF.

mix volt.lint

Scans all .js, .ts, .jsx, .tsx files under the configured :root directory (default: assets/).

Options

  • --plugin — enable an oxlint plugin (repeatable). Available: react, typescript, unicorn, import, jsdoc, jest, vitest, jsx_a11y, nextjs, react_perf, promise, node, vue, oxc

  • --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.