]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
chore: better oxlint + vscode integration (#720)
authorHaoqun Jiang <haoqunjiang@gmail.com>
Tue, 25 Mar 2025 18:48:14 +0000 (02:48 +0800)
committerGitHub <noreply@github.com>
Tue, 25 Mar 2025 18:48:14 +0000 (02:48 +0800)
* chore: add oxlint to file nesting patterns

While only `.oxlintrc.json` is the only official configuration file,
I found [4 file name patterns](https://github.com/oxc-project/oxc/blob/2c53a728b0128290260e3ce676e25a2a0d94ff56/editors/vscode/package.json#L118-L123)
in its vscode extension. So I added them all to the file nesting patterns.

* feat: recommend oxc vscode extension when oxlint is chosen

index.ts
template/base/.vscode/settings.json
template/config/oxlint/.vscode/extensions.json [new file with mode: 0644]

index 67e8d75b5e3d3e8b7122d06ee4dfb376085ee47c..26fe68d401402c54470e0f8f611b845ede3ebbb4 100755 (executable)
--- a/index.ts
+++ b/index.ts
@@ -488,6 +488,10 @@ async function init() {
     render('config/eslint')
   }
 
+  if (needsOxlint) {
+    render('config/oxlint')
+  }
+
   if (needsPrettier) {
     render('config/prettier')
   }
index 985128aa5b38d88623be860d3868f96219e67355..5070dee4b7d49d61d7ced81145af25efd0b6a6ce 100644 (file)
@@ -3,6 +3,6 @@
   "explorer.fileNesting.patterns": {
     "tsconfig.json": "tsconfig.*.json, env.d.ts",
     "vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
-    "package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig"
+    "package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig"
   }
 }
diff --git a/template/config/oxlint/.vscode/extensions.json b/template/config/oxlint/.vscode/extensions.json
new file mode 100644 (file)
index 0000000..99e2f7d
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "recommendations": ["oxc.oxc-vscode"]
+}