ox-standard

Lightning-fast JavaScript Standard Style linting and formatting ⚑

Drop-in replacement for ESLint/Prettier that’s 50~100 times faster. Enforces JavaScript Standard Style using Rust-based oxlint and oxfmt formatter for TypeScript/React projects.

πŸš€ Quick Setup

For Node.js Projects

Replace ESLint/Prettier in your project with one command:

npx JohnDeved/ox-standard

That’s it! The setup automatically:

For Deno Projects

Run the setup in your Deno project directory:

npx JohnDeved/ox-standard

The setup will:

Then install oxlint and oxfmt:

# Using npx (recommended)
npx oxlint --fix .
npx oxfmt .

# Or install globally with Deno
deno install -A -n oxlint https://esm.sh/oxlint
deno install -A -n oxfmt https://esm.sh/oxfmt

✨ What You Get

πŸš€ 100x Faster Performance

πŸ“ JavaScript Standard Style Enforced

🎯 Zero Configuration

πŸ›  Customization

Need to override rules? Easy:

// .oxlintrc.json
{
  "extends": ["./node_modules/ox-standard/.oxlintrc.json"],
  "rules": {
    "no-console": "warn"
  }
}
// .oxfmtrc.json  
{
  "singleQuote": true,
  "semi": false,
  "printWidth": 120,
  "tabWidth": 2,
  "trailingComma": "es5"
}

πŸ’‘ VSCode Integration

The setup automatically configures VSCode for the best experience:

The .vscode/settings.json is configured to use oxc-vscode as the default formatter with experimental oxfmt support enabled. Just install the recommended oxc.oxc-vscode extension when prompted, and formatting will work out of the box!

πŸ†š Migrating from ESLint/Prettier?

The setup script handles everything automatically:

  1. Detects existing ESLint/Prettier configs and packages
  2. Prompts for removal confirmation
  3. Uninstalls old dependencies
  4. Installs and configures ox-standard
  5. Updates VSCode settings

πŸ“– Manual Installation

Node.js Projects

Prefer manual setup?

npm install --save-dev github:JohnDeved/ox-standard

echo '{"extends": ["./node_modules/ox-standard/.oxlintrc.json"]}' > .oxlintrc.json
cp node_modules/ox-standard/.oxfmtrc.json .oxfmtrc.json

npm pkg set scripts.lint="oxlint --fix .; oxfmt ."

Deno Projects

For Deno projects, configuration is embedded directly:

# Run setup script
npx JohnDeved/ox-standard

# Or manually create configs
# The setup script will generate .oxlintrc.json with Deno-specific settings
# including Deno global environment and optimized ignore patterns

# Add to deno.json:
{
  "tasks": {
    "lint": "npx oxlint --fix . && npx oxfmt ."
  }
}

# Run linting
deno task lint

πŸ”§ Complete Rule Reference

70+ carefully selected rules across:

JavaScript Standard Style

Modern JavaScript

React Best Practices

TypeScript Integration

Enhanced Patterns (Unicorn)

🀝 Contributing

Found an issue or want to suggest improvements? Open an issue or submit a pull request.

πŸ“„ License

MIT Β© Johann Berger