Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions .oxlintrc.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": ["packages/*/lib/**"],
"categories": {
"correctness": "error",
"suspicious": "warn",
"pedantic": "warn",
"perf": "warn",
"style": "warn",
"restriction": "off",
},
"plugins": ["import", "unicorn", "oxc", "promise", "jsdoc"],
"rules": {
"catch-error-name": ["warn", { "name": "err" }],
"curly": ["off", "multi-line"],
"group-exports": "off",
"id-length": [
"warn",
{ "exceptions": ["_", "a", "b", "d", "h", "i", "x", "y", "z"] },
],
"init-declarations": "off",
"max-dependencies": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"max-params": ["warn", 4],
"no-continue": "off",
"no-console": "warn",
"no-duplicate-imports": "off",
"no-magic-numbers": "off",
// "no-magic-numbers": ["warn", { "ignore": [-1, 0, 1, 2] }],
"no-nested-ternary": "off",
"no-null": "off",
"no-ternary": "off",
"no-warning-comments": "off",
"no-unused-vars": ["warn", { "ignoreRestSiblings": true }],
"sort-imports": "off",
"sort-keys": "off",

"import/exports-last": "off",
// usually we just export vue components as default export without naming it
"import/no-anonymous-default-export": "off",
// a rule that shall not be enabled anyway
"import/no-named-export": "off",
"import/no-unassigned-import": [
"error",
{ "allow": ["**/*.css", "**/*.scss"] },
],
// named export is preferred in our codebase
"import/prefer-default-export": "off",
"jsdoc/require-param": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-returns-type": "off",
"promise/always-return": "off",
"promise/avoid-new": "off",
"promise/prefer-await-to-then": "off",
"unicorn/filename-case": "off",
// toReversed can introduce memory overhead
"unicorn/no-array-reverse": "off",
// toSorted can introduce memory overhead
"unicorn/no-array-sort": "off",
"unicorn/no-nested-ternary": "off",
// at is not supported by our target environments
"unicorn/prefer-at": "off",
"unicorn/prefer-global-this": "off",

// seems conflicts with prettier
"number-literal-case": "off",
"numeric-separators-style": "off",

// style rules
"capitalized-comments": "off",
"max-statements": ["warn", { "max": 30 }],
"no-inline-comments": "off",

// the following rules are still not supported by oxlint yet
// "import-x/no-restricted-paths": [
// "error",
// {
// "zones": [
// {
// "target": "packages/*/src/client/**",
// "from": "packages/*/src/node/**",
// },
// {
// "target": "packages/*/src/node/**",
// "from": "packages/*/src/client/**",
// },
// ],
// },
// ],
// "vue/multi-word-component-names": [
// "error",
// { "ignores": ["Blog", "Layout", "Slides"] },
// ],
},
"overrides": [
{
"files": ["**/*.ts"],
"plugins": ["typescript"],
"rules": {
"typescript/no-floating-promises": [
"error",
{
"allowForKnownSafeCalls": [
// Avoid explicit marking void for router.push
{
"from": "package",
"name": "push",
"package": "vue-router",
},
// Avoid explicit marking void for router.replace
{
"from": "package",
"name": "replace",
"package": "vue-router",
},
],
},
],
Comment on lines +102 to +120
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The void operator has been removed from router.push() calls in some files but remains in other similar locations. For consistency and to fully comply with the oxlint configuration that allows these calls (lines 105-117 in .oxlintrc.jsonc), consider removing void from the remaining instances at:

  • plugins/features/plugin-notice/src/client/components/Notice.ts:61
  • plugins/search/plugin-docsearch/src/client/composables/useDocSearchSlim.ts:32
  • themes/theme-default/src/client/composables/useNavigate.ts:12,18

Copilot uses AI. Check for mistakes.
// we make type casts only when necessary
"typescript/no-unsafe-type-assertion": "off",
// skipping it for now, may enable it later
"typescript/switch-exhaustiveness-check": "off",
// a lot of time we are just want to check existence
"typescript/strict-boolean-expressions": "off",
},
},
{
"files": ["**/node/**/*.ts"],
"plugins": ["node"],
"rules": {
"no-restricted-imports": [
"error",
"@vuepress/helper/client",
"vuepress/client",
],
},
},
{
"files": ["**/client/**/*.ts"],
"plugins": ["vue"],
"rules": {
"no-restricted-imports": [
"error",
"@vuepress/helper",
"@vuepress/helper/node",
"vuepress/core",
"vuepress/markdown",
"vuepress/utils",
],
"typescript/prefer-nullish-coalescing": [
"warn",
{ "ignoreConditionalTests": true },
],
},
},
{
"files": ["**/__tests__/**"],
"plugins": ["vitest"],
},
{
"files": ["**/create/src/**/*.ts"],
"rules": {
"no-console": "off",
},
},
],
}
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"docs:serve": "http-server -a localhost .vuepress/dist"
},
"dependencies": {
"@mathjax/src": "^4.0.0",
"@mathjax/src": "^4.1.0",
"@vuepress/bundler-vite": "catalog:",
"@vuepress/bundler-webpack": "catalog:",
"@vuepress/helper": "workspace:*",
Expand Down
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"format": "prettier --write .",
"lint": "eslint . && prettier --check . && stylelint **/*.{css,html,scss,vue}",
"lint:fix": "eslint . --fix && prettier --check --write . && stylelint **/*.{css,html,scss,vue} --fix",
"lint:ox": "oxlint . --type-aware",
"prepare": "husky",
"release": "pnpm release:check && pnpm release:version && pnpm release:publish",
"release:check": "pnpm lint && pnpm clean && pnpm build && pnpm test",
Expand All @@ -30,16 +31,20 @@
"package.json": "sort-package-json"
},
"prettier": "prettier-config-vuepress",
"dependencies": {
"oxlint": "^1.37.0",
"oxlint-tsgolint": "^0.10.1"
},
"devDependencies": {
"@commitlint/cli": "^20.2.0",
"@commitlint/config-conventional": "^20.2.0",
"@lerna-lite/cli": "^4.10.2",
"@lerna-lite/publish": "^4.10.2",
"@commitlint/cli": "^20.3.0",
"@commitlint/config-conventional": "^20.3.0",
"@lerna-lite/cli": "^4.10.3",
"@lerna-lite/publish": "^4.10.3",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@types/node": "^25.0.1",
"@types/node": "^25.0.3",
"@types/webpack-env": "^1.18.8",
"@vitest/coverage-istanbul": "4.0.15",
"@vitest/coverage-istanbul": "4.0.16",
"cpx2": "^8.0.0",
"cross-env": "^10.1.0",
"eslint": "^9.39.2",
Expand All @@ -51,23 +56,23 @@
"prettier": "^3.7.4",
"prettier-config-vuepress": "^7.0.4",
"rimraf": "^6.1.2",
"rollup": "^4.53.3",
"rollup": "^4.55.1",
"rollup-plugin-dts": "^6.3.0",
"rollup-plugin-esbuild": "^6.2.1",
"rollup-plugin-resolve-shebang": "^1.0.1",
"sass-embedded": "catalog:",
"sort-package-json": "^3.5.1",
"sort-package-json": "^3.6.0",
"stylelint": "^16.26.1",
"stylelint-config-hope": "^10.0.0",
"stylelint-config-html": "^1.1.0",
"tsconfig-vuepress": "^7.0.0",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"vite": "~7.1.12",
"vitest": "4.0.15",
"vitest": "4.0.16",
"vuepress": "catalog:"
},
"packageManager": "pnpm@10.25.0",
"packageManager": "pnpm@10.27.0",
"engines": {
"node": "^20.19.0 || >= 22.12.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ export const Notice = defineComponent({

if (!option) return null

const {
noticeKey,
actions = [],
title = '',
content = '',
...rest
} = option
const { noticeKey, actions = [], title, content = '', ...rest } = option

return {
...rest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const SlidePage = defineComponent({

const home = (): void => {
closeMenu()
void router.push(routeLocale.value)
router.push(routeLocale.value)
}

onClickOutside(menu, closeMenu)
Expand Down
2 changes: 1 addition & 1 deletion plugins/pwa/plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"workbox-build": "^7.4.0"
},
"devDependencies": {
"rollup": "^4.53.3"
"rollup": "^4.55.1"
},
"peerDependencies": {
"vuepress": "catalog:"
Expand Down
8 changes: 4 additions & 4 deletions plugins/search/plugin-docsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
"style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node"
},
"dependencies": {
"@docsearch/css": "^4.3.2",
"@docsearch/js": "^4.3.2",
"@docsearch/react": "^4.3.2",
"@docsearch/css": "^4.4.0",
"@docsearch/js": "^4.4.0",
"@docsearch/react": "^4.4.0",
"@vuepress/helper": "workspace:*",
"@vueuse/core": "catalog:",
"ts-debounce": "^4.0.0",
"vue": "catalog:"
},
"devDependencies": {
"algoliasearch": "5.46.0"
"algoliasearch": "5.46.2"
},
"peerDependencies": {
"vuepress": "catalog:"
Expand Down
2 changes: 1 addition & 1 deletion plugins/search/plugin-meilisearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"dependencies": {
"@vuepress/helper": "workspace:*",
"commander": "^14.0.2",
"meilisearch": "0.54.0",
"meilisearch": "0.55.0",
"meilisearch-docsearch": "^0.8.0",
"vue": "catalog:"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const SearchBox = defineComponent({
| undefined

if (suggestion)
void router.push(suggestion.link).then(() => {
router.push(suggestion.link).then(() => {
query.value = ''
focusIndex.value = 0
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export default defineComponent({

addQueryHistory(props.queries.join(' '))
addResultHistory(item)
void router.push(getResultPath(item))
router.push(getResultPath(item))
resetSearchResult()
}
} else if (enableResultHistory) {
Expand All @@ -322,7 +322,7 @@ export default defineComponent({
event.preventDefault()
emit('updateQuery', queryHistories.value[index])
} else {
void router.push(resultHistories.value[index].link)
router.push(resultHistories.value[index].link)
resetSearchResult()
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {}
Loading
Loading