From 21ec1b5ca20b911ae7f4db72d01e1d00491658b1 Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Mon, 17 Nov 2025 19:55:11 +0900 Subject: [PATCH] Remove 'ignore' package from dependencies The 'ignore' package has been removed from the dependencies in both htmlhint and htmlhint-server. This reduces the number of dependencies and may improve maintainability if the package is no longer needed. Replace vscode-test with @vscode/test-electron Migrated from the deprecated vscode-test package to @vscode/test-electron in all relevant package files and test scripts. Updated .npmrc with additional settings, removed an obsolete .cursor rules file, and added AGENTS.md with project guidelines. Also updated repository URLs to use the git+https format. Add 'ignore' package as a dependency Added the 'ignore' package (version ^7.0.5) to dependencies in package.json to support file ignoring functionality. Update .npmrc Add build script to package.json Introduced a 'build' script that runs 'npm run compile' in package.json to streamline the build process. Minor whitespace adjustment in dependabot.yml for consistency. Update .npmrc --- .cursor/rules/general.mdc | 11 --------- .github/dependabot.yml | 2 +- .npmrc | 2 +- AGENTS.md | 31 ++++++++++++++++++++++++ htmlhint/package-lock.json | 48 ++++++++++++++------------------------ htmlhint/package.json | 7 +++--- package-lock.json | 37 ++++++++++++++--------------- package.json | 7 +++--- test/runTest.ts | 2 +- 9 files changed, 77 insertions(+), 70 deletions(-) delete mode 100644 .cursor/rules/general.mdc create mode 100644 AGENTS.md diff --git a/.cursor/rules/general.mdc b/.cursor/rules/general.mdc deleted file mode 100644 index 80a5af7..0000000 --- a/.cursor/rules/general.mdc +++ /dev/null @@ -1,11 +0,0 @@ ---- -description: -globs: -alwaysApply: true ---- - -- Before declaring a task is complete, compile the extension to ensure it completes with no errors. -- Never downgrade dependencies -- Always run commands using PowerShell on Windows -- Newly added version/features for the Extension Changelog go at the top. -- As a general rule: some rules, attributes, lists should be in alphabetical order. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 83e4c7a..f7cd6c9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,7 +11,7 @@ updates: patterns: - "*" open-pull-requests-limit: 2 - + - package-ecosystem: npm directory: "/" schedule: diff --git a/.npmrc b/.npmrc index f4e1e4a..d8b9abb 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -registry = 'https://registry.npmjs.org/' +registry='https://registry.npmjs.org/' diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..3a46cd3 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,31 @@ +# Agents + + + +## General Rules + +- Before declaring a task is complete, compile the extension to ensure it completes with no errors. +- Never downgrade dependencies. +- Newly added version/features for the Extension Changelog go at the top. +- As a general rule: some rules, attributes, lists should be in alphabetical order. + +## Communication (MANDATORY) + +- No apologies - State facts and solutions directly. +- Concise style - Professional, avoid repetition and filler. +- Single chunk edits - All file edits in one operation. +- Real file links only - No placeholder files. +- No unnecessary confirmations - Use available context. + +## Quality & Validation (MANDATORY) + +- Never assume commands worked without verification. +- 98%+ confidence threshold for definitive claims. +- Immediate re-investigation when findings don't match expectations. +- Cross-tool validation when tools fail. + +## Code Standards (MANDATORY) + +- No emojis in code or documentation. +- Only implement what's requested. +- Preserve existing structures - Don't remove unrelated code diff --git a/htmlhint/package-lock.json b/htmlhint/package-lock.json index 6777457..9067e7c 100644 --- a/htmlhint/package-lock.json +++ b/htmlhint/package-lock.json @@ -19,7 +19,6 @@ "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "htmlhint": "1.7.1", - "ignore": "^7.0.5", "strip-json-comments": "3.1.1", "vscode-languageclient": "9.0.1", "vscode-languageserver": "9.0.1", @@ -29,8 +28,8 @@ "devDependencies": { "@types/node": "^22.15.31", "@types/vscode": "^1.89.0", - "typescript": "5.5.4", - "vscode-test": "^1.6.1" + "@vscode/test-electron": "^1.6.2", + "typescript": "5.5.4" }, "engines": { "vscode": "^1.89.0" @@ -70,6 +69,22 @@ "dev": true, "license": "MIT" }, + "node_modules/@vscode/test-electron": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-1.6.2.tgz", + "integrity": "sha512-W01ajJEMx6223Y7J5yaajGjVs1QfW3YGkkOJHVKfAMEqNB1ZHN9wCcViehv5ZwVSSJnjhu6lYEYgwBdHtCxqhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "rimraf": "^3.0.2", + "unzipper": "^0.10.11" + }, + "engines": { + "node": ">=8.9.3" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -482,16 +497,6 @@ "node": ">= 6" } }, - "node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -955,23 +960,6 @@ "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", "inBundle": true }, - "node_modules/vscode-test": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.6.1.tgz", - "integrity": "sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA==", - "deprecated": "This package has been renamed to @vscode/test-electron, please update to the new name", - "dev": true, - "license": "MIT", - "dependencies": { - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "rimraf": "^3.0.2", - "unzipper": "^0.10.11" - }, - "engines": { - "node": ">=8.9.3" - } - }, "node_modules/vscode-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", diff --git a/htmlhint/package.json b/htmlhint/package.json index 24b3e5c..206592c 100644 --- a/htmlhint/package.json +++ b/htmlhint/package.json @@ -19,7 +19,7 @@ "homepage": "https://github.com/htmlhint/vscode-htmlhint/blob/main/README.md", "repository": { "type": "git", - "url": "https://github.com/htmlhint/vscode-htmlhint.git" + "url": "git+https://github.com/htmlhint/vscode-htmlhint.git" }, "categories": [ "Programming Languages", @@ -93,12 +93,11 @@ "devDependencies": { "@types/node": "^22.15.31", "@types/vscode": "^1.89.0", - "typescript": "5.5.4", - "vscode-test": "^1.6.1" + "@vscode/test-electron": "^1.6.2", + "typescript": "5.5.4" }, "dependencies": { "htmlhint": "1.7.1", - "ignore": "^7.0.5", "strip-json-comments": "3.1.1", "vscode-languageclient": "9.0.1", "vscode-languageserver": "9.0.1", diff --git a/package-lock.json b/package-lock.json index 72ab257..b1615f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,14 +19,14 @@ "@types/vscode": "^1.89.0", "@typescript-eslint/eslint-plugin": "^7.1.0", "@typescript-eslint/parser": "^7.1.0", + "@vscode/test-electron": "^1.6.2", "eslint": "8.57.1", "eslint-config-prettier": "10.1.8", "glob": "^11.0.3", "mocha": "^11.7.5", "prettier": "3.6.2", "ts-node": "^10.9.2", - "typescript": "5.5.4", - "vscode-test": "^1.6.1" + "typescript": "5.5.4" }, "engines": { "node": ">= 22" @@ -598,6 +598,22 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vscode/test-electron": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-1.6.2.tgz", + "integrity": "sha512-W01ajJEMx6223Y7J5yaajGjVs1QfW3YGkkOJHVKfAMEqNB1ZHN9wCcViehv5ZwVSSJnjhu6lYEYgwBdHtCxqhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "rimraf": "^3.0.2", + "unzipper": "^0.10.11" + }, + "engines": { + "node": ">=8.9.3" + } + }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -2872,23 +2888,6 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" }, - "node_modules/vscode-test": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.6.1.tgz", - "integrity": "sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA==", - "deprecated": "This package has been renamed to @vscode/test-electron, please update to the new name", - "dev": true, - "license": "MIT", - "dependencies": { - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "rimraf": "^3.0.2", - "unzipper": "^0.10.11" - }, - "engines": { - "node": ">=8.9.3" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 9f23852..95fa9a1 100644 --- a/package.json +++ b/package.json @@ -9,12 +9,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/htmlhint/vscode-htmlhint.git" + "url": "git+https://github.com/htmlhint/vscode-htmlhint.git" }, "funding": "https://opencollective.com/htmlhint", "license": "MIT", "author": "HTMLHint", "scripts": { + "build": "npm run compile", "lint": "eslint -c .eslintrc.js --ext .ts .", "lint:fix": "eslint -c .eslintrc.js --ext .ts . --fix", "prettier": "prettier --write \"**/*.{js,md,ts,yml}\"", @@ -36,14 +37,14 @@ "@types/vscode": "^1.89.0", "@typescript-eslint/eslint-plugin": "^7.1.0", "@typescript-eslint/parser": "^7.1.0", + "@vscode/test-electron": "^1.6.2", "eslint": "8.57.1", "eslint-config-prettier": "10.1.8", "glob": "^11.0.3", "mocha": "^11.7.5", "prettier": "3.6.2", "ts-node": "^10.9.2", - "typescript": "5.5.4", - "vscode-test": "^1.6.1" + "typescript": "5.5.4" }, "engines": { "node": ">= 22" diff --git a/test/runTest.ts b/test/runTest.ts index c10591e..015bbc7 100644 --- a/test/runTest.ts +++ b/test/runTest.ts @@ -1,5 +1,5 @@ import * as path from "path"; -import { runTests } from "vscode-test"; +import { runTests } from "@vscode/test-electron"; async function main() { try {