Loading...
Loading...
Run and configure oxlint — the high-performance JavaScript/TypeScript linter built on the Oxc compiler stack. Use this skill whenever working in a project that has oxlint installed (check for `oxlint` in package.json devDependencies or an `.oxlintrc.json` / `oxlint.config.ts` config file). This includes when you need to lint code after making changes, fix linting errors, configure oxlint rules/plugins, set up or modify `.oxlintrc.json`, or migrate from ESLint.
npx skill4agent add delexw/claude-code-misc oxlintoxlintpackage.json.oxlintrc.jsonoxlint.config.tsoxlintlintpackage.jsonoxlint# If package.json has a lint script using oxlint
npm run lint
# Otherwise, run directly
npx oxlintnpx oxlint --fix--fix--fix-dangerouslynpx oxlint src/components/Button.tsx src/utils/helpers.ts(no-unused-vars)// oxlint-ignorenpx oxlint --format json # Machine-readable JSON
npx oxlint --format github # GitHub Actions annotations
npx oxlint --format unix # Simple one-line-per-error formatnpx oxlint --init.oxlintrc.json{
// Enable/disable individual rules with severity levels
"rules": {
"no-unused-vars": "error",
"no-console": "warn",
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }]
},
// Enable groups of related rules by category
"categories": {
"correctness": "error", // Definitely-wrong code
"suspicious": "warn", // Probably-wrong code
"pedantic": "off", // Opinionated style checks
"perf": "warn", // Performance anti-patterns
"style": "off", // Cosmetic preferences
"restriction": "off", // Extra-strict rules (opt-in)
"nursery": "off" // Unstable/experimental rules
},
// Plugins to enable (setting this overwrites defaults, so list all you want)
"plugins": ["typescript", "unicorn", "oxc"],
// File-specific overrides
"overrides": [
{
"files": ["**/*.test.{ts,tsx}"],
"rules": { "no-console": "off" }
},
{
"files": ["scripts/**"],
"rules": { "no-console": "off" }
}
],
// Environment globals
"env": {
"browser": true,
"node": true
},
// Plugin-wide settings
"settings": {
"react": {
"linkComponents": [{ "name": "Link", "linkAttribute": "to" }]
},
"jsx-a11y": {
"components": { "Link": "a", "Button": "button" }
}
},
// Type-aware linting (requires tsconfig)
"options": {
"typeAware": true
}
}"off""allow""warn""error""deny""no-console""eslint/no-console"correctness: "error"suspicious: "warn"typescriptunicornoxc| Plugin | CLI flag | Purpose |
|---|---|---|
| react | | React-specific rules |
| jsx-a11y | | Accessibility rules for JSX |
| nextjs | | Next.js best practices |
| import | | Import/export validation |
| jest | | Jest testing rules |
| vitest | | Vitest testing rules |
| jsdoc | | JSDoc documentation rules |
| node | | Node.js-specific rules |
| promise | | Promise best practices |
| react-perf | | React performance rules |
| vue | | Vue.js rules |
--disable-typescript-plugin--disable-unicorn-plugin--disable-oxc-plugin{
"extends": ["./configs/base.json", "./configs/frontend.json"]
}.oxlintrc.json--disable-nested-config| Flag | What it does |
|---|---|
| Use a specific config file |
| TypeScript config for path aliases |
| Auto-fix safe issues |
| Also apply suggested fixes |
| Suppress a rule (e.g., |
| Warn on a rule |
| Error on a rule |
| Suppress warnings, show only errors |
| Treat warnings as errors (exit non-zero) |
| Fail if more than N warnings |
| Output format: default, json, github, unix, etc. |
| Exclude files matching pattern |
| Enable type-informed rules (needs tsconfig) |
| Show resolved config (useful for debugging) |
| List all available rules |
-A-W-Dnpx oxlint -D correctness -W suspicious -A pedantic// oxlint-ignore no-console -- needed for debug logging
console.log(debugInfo);
// oxlint-ignore-next-line no-unused-vars
const _placeholder = computeValue();oxlint-ignoreeslint-disableeslint-plugin-oxlintnpm install -D eslint-plugin-oxlint@oxlint/migratenpx @oxlint/migrate.oxlintrc.json.js.mjs.cjs.ts.mts.cts.jsx.tsx.vue.svelte.astro.vue.svelte.astro<script>