-
Notifications
You must be signed in to change notification settings - Fork 84
build: introduce oxlint #586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces oxlint as a new linting tool for the VuePress ecosystem project. The main goal is to enhance code quality and consistency by adding a faster, more modern linting solution alongside the existing ESLint setup.
Key Changes:
- Added oxlint and oxlint-tsgolint as project dependencies with comprehensive configuration
- Replaced the shared TypeScript configuration with an explicit, inline configuration that enables stricter type checking (
noImplicitAny: true) - Refactored code to comply with oxlint rules (removed unnecessary
voidoperators, simplified array creation, cleaned up destructuring) - Updated multiple dependencies across the workspace to their latest versions
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.oxlintrc.jsonc |
Added comprehensive oxlint configuration with custom rules for TypeScript, import management, and VuePress-specific patterns including special handling for vue-router methods |
tsconfig.base.json |
Replaced shared config extension with explicit TypeScript compiler options, enabling stricter type checking including noImplicitAny: true |
tsconfig.json |
Removed redundant baseUrl property (paths are resolved relative to tsconfig location by default) |
package.json |
Added oxlint dependencies, new lint:ox script, and updated multiple dev dependencies to latest versions |
pnpm-workspace.yaml |
Updated workspace catalog dependencies (chokidar, sass, vue) to latest versions |
tools/helper/src/client/utils/getHeaders.ts |
Refactored array creation from new Array() to more idiomatic Array.from() |
plugins/features/plugin-notice/src/client/components/Notice.ts |
Removed unnecessary default value from title parameter (already required by interface) |
plugins/search/plugin-slimsearch/src/client/components/SearchResult.ts |
Removed void operators from router.push() calls per oxlint configuration |
plugins/search/plugin-search/src/client/components/SearchBox.ts |
Removed void operators from router.push() calls per oxlint configuration |
plugins/markdown/plugin-revealjs/src/client/layouts/SlidePage.ts |
Removed void operators from router.push() calls per oxlint configuration |
plugins/tools/plugin-register-components/tests/__fixtures__/components/FooBaz.ts |
Added empty module export to satisfy TypeScript isolated modules requirement |
tools/shiki-twoslash/package.json |
Updated twoslash dependencies from 0.3.4 to 0.3.6 |
tools/helper/package.json |
Updated @vue/shared from 3.5.25 to 3.5.26 |
tools/create-vuepress/package.json |
Updated @inquirer/prompts from 8.0.2 to 8.1.0 |
plugins/search/plugin-meilisearch/package.json |
Updated meilisearch from 0.54.0 to 0.55.0 |
plugins/search/plugin-docsearch/package.json |
Updated @docsearch/* packages from 4.3.2 to 4.4.0 and algoliasearch to 5.46.2 |
plugins/pwa/plugin-pwa/package.json |
Updated rollup from 4.53.3 to 4.55.1 |
docs/package.json |
Updated @mathjax/src from 4.0.0 to 4.1.0 |
| "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", | ||
| }, | ||
| ], | ||
| }, | ||
| ], |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
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:61plugins/search/plugin-docsearch/src/client/composables/useDocSearchSlim.ts:32themes/theme-default/src/client/composables/useNavigate.ts:12,18
No description provided.