Skip to content
tai-kun's Vite+ Lint Plugins
Esc
↑↓navigate↵open⌘Jpreview
On this page

Rules

All Oxlint rules provided by `@tai-kun/vp-lint-plugins`.

@tai-kun/vp-lint-plugins provides custom Oxlint rules for Vite+. Add the plugin to lint.jsPlugins in vite.config.ts to enable rules under the tai-kun/ prefix.

Setup

import { defineConfig } from "vite-plus";

export default defineConfig({
  lint: {
    jsPlugins: [
      {
        name: "tai-kun",
        specifier: "@tai-kun/vp-lint-plugins",
      },
    ],
    rules: {
      "tai-kun/spaced-comment": "error",
    },
  },
});

Reference each rule as tai-kun/<rule-name>. Most rules only insert minimal whitespace and leave final formatting to Oxfmt.

Comments

Rule Description Auto-fix
spaced-comment Require whitespace after the comment marker and before the closing marker. Yes
comment-one-sentence-per-line Enforce one sentence per comment line and collapse simple block comments. Partial (joins and collapsing)
comment-japanese-spacing Require a half-width space between Japanese and half-width characters. Yes

JSDoc

Rule Description Auto-fix
jsdoc-tag-lines Normalize blank lines between a JSDoc description and tag groups. Yes
jsdoc-tag-order Enforce a consistent order of JSDoc tags. No
jsdoc-param-order Require @param tags to follow the order of function parameters. No

Blank lines

Rule Description Auto-fix
blank-line Require blank lines between statements, class members, and switch cases. Yes

Layout

Rule Description Auto-fix
object-properties-newline Enforce multiline object literals when they have two or more properties. Yes
type-literal-properties-newline Enforce multiline type literals when they have two or more members. Yes

Imports

Rule Description Auto-fix
merge-imports Merge consecutive import declarations that import from the same module. Yes

Sorting

Rule Description Auto-fix
sort-object-properties Sort object properties by name length and then by name. Yes
sort-type-members Sort type literal members by name length and then by name. Yes
sort-jsx-props Sort JSX props by group, name length, and name. Yes
sort-import-export-specifiers Sort import and export specifiers by group, name length, and name. Yes

Classes and functions

Rule Description Auto-fix
overload-signatures-adjacent Require overload signatures to be adjacent to each other and their implementation. Yes
member-ordering Enforce a consistent order of class members. No
explicit-member-accessibility Require accessibility modifiers for class members except # private members. No

Tests

Rule Description Auto-fix
no-await-in-expect Require await expect(...).resolves or .rejects instead of expect(await ...). Yes

Was this page helpful?