Skip to main content

Overview

The vinext lint command delegates to your project’s linter (eslint or oxlint), making it easy to check code quality without remembering which linter you’re using.

How It Works

vinext automatically detects and uses the appropriate linter:
  1. eslint with Next.js config — If you have eslint installed with an existing config (.eslintrc.json, eslint.config.js, etc.), vinext runs eslint .
  2. oxlint — If oxlint is installed, vinext uses it (much faster than eslint)
  3. eslint fallback — If only eslint is installed without config, runs eslint .
  4. No linter — Suggests installation options

Options

flag
Show help for the lint command

Setup

Using eslint (Next.js style)

npm
Create .eslintrc.json:

Using oxlint (faster)

npm
Create .oxlintrc.json:

Examples

Basic usage

Output:

With oxlint

Output:

No linter installed

Output:

Linter Detection Priority

vinext checks for linters in this order:
  1. eslint + config files.eslintrc.json, .eslintrc.js, .eslintrc.cjs, eslint.config.js, eslint.config.mjs
  2. oxlint — Checks for node_modules/.bin/oxlint
  3. eslint (no config) — Checks for node_modules/.bin/eslint

Integration with CI/CD

GitHub Actions

package.json script

Configuration

eslint-config-next rules

The eslint-config-next package includes rules for:
  • React Hooks
  • Next.js best practices
  • Accessibility (jsx-a11y)
  • Import organization

oxlint configuration

oxlint is faster but has fewer rules. Configure via .oxlintrc.json:

Troubleshooting

Add a .eslintignore file or configure ignorePatterns in your eslint config:
Adjust rule levels in .oxlintrc.json:
Consider switching to oxlint:
oxlint is typically 50-100x faster than eslint.

Comparison: eslint vs oxlint

Next Steps

typecheck

Type check with TypeScript

test

Run tests