@blogic-cz/oxc-config
v1.5.7
Published
Shared oxlint and oxfmt configs for blogic projects — layered TypeScript, React, and formatter presets
Downloads
6,274
Maintainers
Readme
@blogic-cz/oxc-config
Shared oxlint and oxfmt configs for blogic projects. Layered TypeScript, React, and formatter presets.
Configs
Linter (oxlint)
| Config | Use case | Plugins |
|--------|----------|---------|
| .oxlintrc.ts.json | TypeScript projects (CLI, services, libraries) | eslint, import, node, oxc, promise, typescript, unicorn, vitest |
| .oxlintrc.ts-react.json | React + TypeScript projects | extends ts.json + jsx-a11y, react, react-perf |
Formatter (oxfmt)
| Config | Use case | What's shared |
|--------|----------|---------------|
| .oxfmtrc.base.jsonc | All projects | semi, quotes, width, tabs, import sort groups, ignore patterns |
Note:
sortImports.internalPatternandsortTailwindcssare project-specific — set them in your local.oxfmtrc.jsonc.
Usage
Install:
bun add -d @blogic-cz/oxc-configLinter
In your project's .oxlintrc.json:
{
"extends": ["@blogic-cz/oxc-config/oxlint/ts-react"],
"rules": {
// project-specific rules only
},
"overrides": [
// project-specific overrides only
]
}For non-React projects:
{
"extends": ["@blogic-cz/oxc-config/oxlint/ts"]
}Formatter
oxfmt doesn't support extends yet, so copy the base and add project-specific settings:
cp node_modules/@blogic-cz/oxc-config/.oxfmtrc.base.jsonc .oxfmtrc.jsoncThen add your project-specific sortImports.internalPattern and sortTailwindcss:
{
// ... base settings from @blogic-cz/oxc-config ...
"sortImports": {
"internalPattern": ["@/", "@your-project/"],
"groups": [ /* already in base */ ]
},
"sortTailwindcss": {
"stylesheet": "./apps/web-app/src/styles/app.css",
"functions": ["clsx", "cn"]
}
}What's included
Linter — categories (error by default)
correctnessperfsuspicious
Linter — key rules (all error)
- No
any, noas Typesuppression, consistent type imports - No relative parent imports, no import cycles, no default exports
eqeqeq,require-await,no-varunicorn/consistent-function-scoping,unicorn/prefer-set-haspromise/always-returnoxc/no-map-spread
Linter — React layer adds
jsx-a11y/*accessibility rulesreact/rules-of-hooks,react-hooks/exhaustive-depsreact/no-array-index-key,react/self-closing-comp
Linter — shared overrides
Test files, scripts, and tooling paths (.claude, .agents, .opencode) have relaxed rules where appropriate.
Formatter — what's shared
semi: true,singleQuote: false,printWidth: 60tabWidth: 2,useTabs: false,trailingComma: "es5"- Import sort groups (type-first, then builtin/external, then internal)
- Standard ignore patterns (assets, build output, node_modules)
License
MIT
