Personal oxlint rules plugin.
pnpm add -D oxlint-plugin-posvaIn .oxlintrc.json:
The $schema above extends the base oxlint schema with typed entries for this plugin's rules, giving you autocompletion for rule names and their options.
If you use multiple JS plugins that each ship their own schema, you can create a local schema that merges them all with allOf:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{ "$ref": "./node_modules/oxlint-plugin-posva/schema.json" },
{ "$ref": "./node_modules/oxlint-plugin-other/schema.json" }
]
}Save it as e.g. oxlintrc-schema.json and reference it in your config:
{
"$schema": "./oxlintrc-schema.json",
}| Rule | Description | Fixable |
|---|---|---|
style-prefer-inline-variable |
Flag variables read only once, suggest inlining. Option ignoreMultipleWords (default: true) |
Yes |
| Rule | Description | Fixable |
|---|---|---|
vitest-prefer-to-have-been-called-times |
Enforce toHaveBeenCalledTimes(N) over toHaveBeenCalledOnce() or not.toHaveBeenCalled() |
Yes |
{ "$schema": "./node_modules/oxlint-plugin-posva/schema.json", "jsPlugins": ["oxlint-plugin-posva"], "rules": { "posva/vitest-prefer-to-have-been-called-times": "error", }, }