Usage
npm install -D @monstermann/stdlib-style dprint oxlint oxlint-tsgolintpnpm add -D @monstermann/stdlib-style dprint oxlint oxlint-tsgolintyarn add -D @monstermann/stdlib-style dprint oxlint oxlint-tsgolintbun add -D @monstermann/stdlib-style dprint oxlint oxlint-tsgolintnub add -D @monstermann/stdlib-style dprint oxlint oxlint-tsgolintaube add -D @monstermann/stdlib-style dprint oxlint oxlint-tsgolintSetup
{
"extends": "./node_modules/@monstermann/stdlib-style/dprint.json"
}
import oxlint from "@monstermann/stdlib-style/oxlint"
export default oxlint({
ignores: ["src-tauri/target"],
tailwind: `${import.meta.dirname}/src/index.css`,
overrides: [{
files: ["cli/**"],
rules: { "no-console": "off" },
}],
})
| Option | Description |
|---|---|
tailwind |
The CSS file that imports Tailwind. Lints classes, including those its @theme adds. |
ignores |
Globs that are not linted, next to node_modules, dist, lockfiles, … |
overrides |
Oxlint overrides, after the ones of the config. |
tsconfig.json, one per runtime:
{ "extends": "@monstermann/stdlib-style/tsconfig.web.json" }{ "extends": "@monstermann/stdlib-style/tsconfig.bun.json" }Editor integration
Zed
{
"languages": {
"TypeScript": {
"format_on_save": "on",
"formatter": [
{ "code_action": "source.fixAll.oxc" },
{ "language_server": { "name": "dprint" } }
]
},
"TSX": {
"format_on_save": "on",
"formatter": [
{ "code_action": "source.fixAll.oxc" },
{ "language_server": { "name": "dprint" } }
]
},
"JavaScript": {
"format_on_save": "on",
"formatter": [
{ "code_action": "source.fixAll.oxc" },
{ "language_server": { "name": "dprint" } }
]
},
"JSON": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "dprint" } }
},
"JSONC": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "dprint" } }
},
"Markdown": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "dprint" } }
},
"CSS": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "dprint" } }
},
"HTML": {
"format_on_save": "on",
"formatter": { "language_server": { "name": "dprint" } }
}
},
"lsp": {
"oxlint": {
"initialization_options": {
"settings": { "typeAware": true }
}
}
}
}
VSCode
{
"editor.defaultFormatter": "dprint.dprint",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.oxc": "explicit"
}
}