Bläddra i källkod

Merge pull request #871 from nissa-seru/fix-vsix-add-lint-fix

Fix vsix command; add lint-fix; add .gitignore entry for .eslintrc.local.json
Matt Rubens 10 månader sedan
förälder
incheckning
68cc942482
3 ändrade filer med 6 tillägg och 1 borttagningar
  1. 1 0
      .gitignore
  2. 4 1
      package.json
  3. 1 0
      webview-ui/package.json

+ 1 - 0
.gitignore

@@ -22,3 +22,4 @@ docs/_site/
 
 # Dotenv
 .env.integration
+.eslintrc.local.json

+ 4 - 1
package.json

@@ -272,6 +272,7 @@
 		"compile:integration": "tsc -p tsconfig.integration.json",
 		"install:all": "npm install && cd webview-ui && npm install",
 		"lint": "eslint src --ext ts && npm run lint --prefix webview-ui",
+		"lint-fix": "eslint src --ext ts --fix && npm run lint-fix --prefix webview-ui",
 		"package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production",
 		"pretest": "npm run compile && npm run compile:integration",
 		"dev": "cd webview-ui && npm run dev",
@@ -283,7 +284,7 @@
 		"publish": "npm run build && changeset publish && npm install --package-lock-only",
 		"version-packages": "changeset version && npm install --package-lock-only",
 		"vscode:prepublish": "npm run package",
-		"vsix": "mkdir -p bin && npx vsce package --out bin",
+		"vsix": "rimraf bin && mkdirp bin && npx vsce package --out bin",
 		"watch": "npm-run-all -p watch:*",
 		"watch:esbuild": "node esbuild.js --watch",
 		"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
@@ -350,6 +351,8 @@
 		"@vscode/test-cli": "^0.0.9",
 		"@vscode/test-electron": "^2.4.0",
 		"esbuild": "^0.24.0",
+		"mkdirp": "^3.0.1",
+		"rimraf": "^6.0.1",
 		"eslint": "^8.57.0",
 		"husky": "^9.1.7",
 		"jest": "^29.7.0",

+ 1 - 0
webview-ui/package.json

@@ -5,6 +5,7 @@
 	"type": "module",
 	"scripts": {
 		"lint": "eslint src --ext ts,tsx",
+		"lint-fix": "eslint src --ext ts,tsx --fix",
 		"check-types": "tsc --noEmit",
 		"test": "jest",
 		"dev": "vite",