From 3c5dde2a03d5be6803ed95be31af9972f1c4ad2f Mon Sep 17 00:00:00 2001 From: Nissa Seru <119150866+nissa-seru@users.noreply.github.com> Date: Sat, 8 Feb 2025 07:23:54 -0500 Subject: [PATCH 1/4] Add local eslintrc config to .gitignore to enable local use of additional linting rules --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9deb750e65..9d123c2412 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ docs/_site/ # Dotenv .env.integration +.eslintrc.local.json From b6eb80e10d24b77bf67f4fe133ea0b3670fff577 Mon Sep 17 00:00:00 2001 From: Nissa Seru <119150866+nissa-seru@users.noreply.github.com> Date: Sat, 8 Feb 2025 07:26:13 -0500 Subject: [PATCH 2/4] Use `rimraf` and `mkdirp` in `vsix` command to avoid misparsing of `-p` arg and build failure if `bin` dir exists. --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9efe5b87dd..97cca7d8c0 100644 --- a/package.json +++ b/package.json @@ -283,7 +283,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 +350,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", From c84551f1e6aa716edd6634eda43cbef2263de906 Mon Sep 17 00:00:00 2001 From: Nissa Seru <119150866+nissa-seru@users.noreply.github.com> Date: Sat, 8 Feb 2025 07:31:48 -0500 Subject: [PATCH 3/4] Add `lint-fix` command; existing `lint` command is unchanged --- package.json | 3 ++- webview-ui/package.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 97cca7d8c0..e0301792b6 100644 --- a/package.json +++ b/package.json @@ -271,7 +271,8 @@ "compile": "tsc -p . --outDir out && node esbuild.js", "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 && 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", diff --git a/webview-ui/package.json b/webview-ui/package.json index d7a5765690..3317551f20 100644 --- a/webview-ui/package.json +++ b/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", From 987fabb2ca7cfa74f1d98c3d6ccc8a83ad39f71c Mon Sep 17 00:00:00 2001 From: Nissa Seru <119150866+nissa-seru@users.noreply.github.com> Date: Sat, 8 Feb 2025 07:44:16 -0500 Subject: [PATCH 4/4] Typo fix --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e0301792b6..b3a8afcb88 100644 --- a/package.json +++ b/package.json @@ -271,7 +271,7 @@ "compile": "tsc -p . --outDir out && node esbuild.js", "compile:integration": "tsc -p tsconfig.integration.json", "install:all": "npm install && cd webview-ui && npm install", - "lint-fix": "eslint src --ext ts && npm run lint --prefix webview-ui", + "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",