Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cloudflare/vinext/llms.txt

Use this file to discover all available pages before exploring further.

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.
vinext lint

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

--help
flag
Show help for the lint command

Setup

Using eslint (Next.js style)

npm
npm install -D eslint eslint-config-next
Create .eslintrc.json:
{
  "extends": "next/core-web-vitals"
}

Using oxlint (faster)

npm
npm install -D oxlint
Create .oxlintrc.json:
{
  "rules": {
    "typescript": "error",
    "react": "error"
  }
}

Examples

Basic usage

vinext lint
Output:
vinext lint

Using eslint (with existing config)

✓ No linting errors found

Lint passed.

With oxlint

vinext lint
Output:
vinext lint

Using oxlint

Lint passed.

No linter installed

vinext lint
Output:
vinext lint

No linter found. Install eslint or oxlint:

  npm install -D eslint eslint-config-next
  # or
  npm install -D oxlint

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

name: Lint
on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm install
      - run: npm run lint  # or vinext lint

package.json script

{
  "scripts": {
    "lint": "vinext lint"
  }
}

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:
{
  "rules": {
    "typescript": "error",
    "react": "error",
    "jsx-a11y": "warn"
  },
  "deny-warnings": true
}

Troubleshooting

Add a .eslintignore file or configure ignorePatterns in your eslint config:
{
  "extends": "next/core-web-vitals",
  "ignorePatterns": ["dist/", "node_modules/", ".next/"]
}
Adjust rule levels in .oxlintrc.json:
{
  "rules": {
    "typescript": "warn",
    "react": "error"
  }
}
Consider switching to oxlint:
npm install -D oxlint
vinext lint  # automatically uses oxlint
oxlint is typically 50-100x faster than eslint.

Comparison: eslint vs oxlint

Featureeslintoxlint
SpeedSlower (5-10s for medium projects)Much faster (0.1-0.5s)
Rules200+ rules, highly configurable~100 rules, focused on correctness
PluginsExtensive ecosystemNo plugin support
Auto-fixYesYes (limited)
Next.js integrationOfficial eslint-config-nextManual configuration

Next Steps

typecheck

Type check with TypeScript

test

Run tests

Build docs developers (and LLMs) love