Conversation
Replaces prettier and prettier-plugin-organize-imports with oxfmt. Config migrated via `oxfmt --migrate=prettier` (endOfLine: auto dropped as unsupported). Lint scripts now call `oxfmt` / `oxfmt --check`.
Runs oxfmt → oxlint → eslint in lint scripts. Oxlint config enables the full Correctness category plus explicit overrides for the handful of eslint:recommended rules that live in other categories. eslint.config.mjs uses oxlint.buildFromOxlintConfigFile() so ESLint only runs rules oxlint can't cover (mainly eslint-plugin-vue template rules).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Description
Modernizes the repo tooling.
Prettier → Oxfmt for formatting; ESLint 8 (legacy
.eslintrc.json)ESLint → Oxlint; added Oxlint as a fast first-pass linter running alongside ESLint.
No runtime/content changes — this is tooling only. Only two files are formatted/linted with real logic (
src/.vuepress/config.tsandsrc/.vuepress/components/SwaggerComponent.vue); the rest is Markdown, SCSS, and JSON.Shape
Formatting (Oxfmt)
.oxfmtrc.jsongenerated viaoxfmt --migrate=prettier.endOfLine: autodropped as unsupported; ignore patterns migrated. One minor reformat inpalette.scss(multi-line--font-familyvalue) and one inSwaggerComponent.vue(empty<div></div>normalized to self-closing<div />, a hardcoded Oxfmt behavior for empty non-void Vue elements).Linting (Oxlint + ESLint)
.oxlintrc.json) enables the full Correctness category plus explicit overrides for the handful ofeslint:recommendedrules that live in other categories (Pedantic/Restriction/Suspicious). Net effect vs. the oldeslint:recommended: same 66 rules preserved, +19 new Correctness rules gained..eslintrc.jsonand.eslintignore(flat config ignores the latter).eslint.config.mjscomposes@eslint/js,eslint-plugin-vue(flat/recommended),eslint-config-prettier, afiles/globalsblock providingbrowser + nodeglobals for.js/.mjs/.cjs/.ts/.vue, andeslint-plugin-oxlint'sbuildFromOxlintConfigFile()last to disable rules Oxlint already runs.eslint-plugin-vuetemplate linting (Oxlint only lints the<script>block of.vuefiles).oxfmt → oxlint → eslintchained inlint/lint:check.ESLint v10 ecosystem versions
eslint@^10,@eslint/js@^10,eslint-plugin-vue@^10,vue-eslint-parser@^10(explicit because it's a peer dep),eslint-config-prettier@^10,globals@^17.Checklist
I did the following to ensure that my changes were tested thoroughly:
pnpm run lint:check— oxfmt, oxlint (85 rules on 3 files), and eslint all pass clean on a fresh clone.pnpm run build— Vuepress build succeeds (34 pages rendered).no-unused-varsviolation in a.tsfile and confirmed Oxlint flags it while ESLint stays silent (verifieseslint-plugin-oxlintdisables overlapping rules correctly).vue/no-duplicate-attributesviolation in a.vuetemplate and confirmed ESLint flags it (verifies Vue template linting is preserved)..tsand.vuefiles are actually linted by ESLint via--debugoutput.I did the following to ensure that my changes do not introduce security vulnerabilities: