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.
Replace ESLint/Prettier in your project with one command:
npx JohnDeved/ox-standardThat's it! The setup automatically:
- ✅ Removes ESLint and Prettier packages and configs
- ✅ Installs oxlint with Standard Style configuration
- ✅ Installs oxfmt formatter with Standard Style configuration
- ✅ Updates your package.json scripts
- ✅ Configures VSCode settings and extensions
Run the setup in your Deno project directory:
npx JohnDeved/ox-standardThe setup will:
- ✅ Detect your Deno project automatically
- ✅ Create .oxlintrc.json with Deno-specific configuration
- ✅ Create .oxfmtrc.json with Standard Style formatting
- ✅ Add lint task to your deno.json
- ✅ Configure VSCode settings and extensions
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- Rust-based oxlint: Sub-second linting even on large codebases
- oxfmt formatter: Lightning-fast formatting from the oxc ecosystem
- Single command:
npm run lint(Node.js) ordeno task lint(Deno) handles both linting and formatting
- No semicolons, single quotes, 2-space indentation
- Strict equality (
===), modern ES6+ patterns - React hooks best practices, TypeScript consistency
- Works out of the box for TypeScript and React
- Supports both Node.js and Deno projects
- Extensible configs you can customize
- VSCode integration with recommended extensions
Need to override rules? Easy:
// .oxfmtrc.json
{
"singleQuote": true,
"semi": false,
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5"
}The setup automatically configures VSCode for the best experience:
- Auto-formatting on save with oxfmt via the oxc-vscode extension
- Auto-fixing linting issues on save
- Recommended extensions installation prompt
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!
The setup script handles everything automatically:
- Detects existing ESLint/Prettier configs and packages
- Prompts for removal confirmation
- Uninstalls old dependencies
- Installs and configures ox-standard
- Updates VSCode settings
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 ."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 lint70+ carefully selected rules across:
eqeqeq- Strict equality (===)curly- Consistent bracesno-var- Useconst/letspace-infix-ops- Proper spacingyoda- Readable comparisons
prefer-template- Template literalsprefer-destructuring- Modern patternsprefer-object-spread- Clean objectsno-duplicate-imports- Organized imports
rules-of-hooks- Proper hooks usagejsx-curly-brace-presence- Clean JSXself-closing-comp- Concise components
consistent-type-imports- Clean importsarray-type- Consistent syntaxprefer-as-const- Type assertions
prefer-includes- Better array methodsprefer-string-starts-ends-with- Modern stringsthrow-new-error- Proper errors
Found an issue or want to suggest improvements? Open an issue or submit a pull request.
MIT © Johann Berger