Skip to content

Commit c6489ed

Browse files
authored
Merge pull request #174 from gblanc-1a/fix/vulnerability_fix_in_direct_dependencies
fix: minimatch high vulnerability for direct dependencies
2 parents ab2dfd9 + 9b0dc1e commit c6489ed

16 files changed

+2705
-4157
lines changed

.eslintrc.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ build/
3838
# Test outputs
3939
test-out/
4040
test-dist/
41+
lib/dist-test/
4142
coverage/
4243
.nyc_output/
4344

AGENTS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ LOG_LEVEL=ERROR npm test
211211
# Capture test output for analysis
212212
LOG_LEVEL=ERROR npm test 2>&1 | tee test.log | tail -20
213213

214-
npm run lint # ESLint
214+
npm run lint # ESLint (v9 flat config: eslint.config.mjs)
215215
npm run package:vsix # Create .vsix package
216216
```
217217

@@ -241,6 +241,12 @@ Register via `RepositoryAdapterFactory.register('type', AdapterClass)`. Implemen
241241
### Scopes
242242
Installs support `user`, `workspace`, and `repository` scopes. Repository scope uses the lockfile (`prompt-registry.lock.json`) as the single source of truth.
243243

244+
### Linting
245+
ESLint v9 with flat config (`eslint.config.mjs`). The `lib/` directory is excluded from root linting (it has its own ESLint setup). The `@typescript-eslint/semi` rule was removed in v8 — formatting is handled by Prettier (`eslint-config-prettier`).
246+
247+
### lib/ workspace
248+
`lib/` is a separate npm workspace (`@prompt-registry/collection-scripts`). Tests compile to `lib/dist-test/` via `lib/tsconfig.test.json` before running with mocha. Run `cd lib && npm test` to build and test.
249+
244250
### Error Handling
245251
Use `Logger.getInstance()`. Throw errors with clear messages. Commands catch and show via VS Code notifications.
246252

docs/contributor-guide/development-setup.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Node.js 18.x or 20.x
66
- npm 8.x+
7+
- TypeScript 5.3+
78
- VS Code (latest)
89
- Git
910

@@ -25,8 +26,8 @@ Press `F5` in VS Code to launch Extension Development Host.
2526
# Development
2627
npm run watch # Dev mode with auto-compile
2728
npm run compile # Production build
28-
npm run lint # Check code style
29-
npm run lint -- --fix # Auto-fix lint issues
29+
npm run lint # Check code style (ESLint v9 flat config)
30+
npm run lint:fix # Auto-fix lint issues
3031

3132
# Testing
3233
npm test # Run all tests (unit + integration)

eslint.config.mjs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import eslint from "@eslint/js";
2+
import tseslint from "typescript-eslint";
3+
import eslintConfigPrettier from "eslint-config-prettier";
4+
5+
export default tseslint.config(
6+
{
7+
ignores: ["out/", "test-out/", "dist/", "test-dist/", "**/*.d.ts", "node_modules/", "lib/"],
8+
},
9+
eslint.configs.recommended,
10+
eslintConfigPrettier,
11+
{
12+
files: ["src/**/*.ts"],
13+
plugins: {
14+
"@typescript-eslint": tseslint.plugin,
15+
},
16+
languageOptions: {
17+
parser: tseslint.parser,
18+
ecmaVersion: 2020,
19+
sourceType: "module",
20+
globals: {
21+
Buffer: "readonly",
22+
NodeJS: "readonly",
23+
console: "readonly",
24+
process: "readonly",
25+
setTimeout: "readonly",
26+
clearTimeout: "readonly",
27+
setInterval: "readonly",
28+
clearInterval: "readonly",
29+
URL: "readonly",
30+
__dirname: "readonly",
31+
__filename: "readonly",
32+
require: "readonly",
33+
module: "readonly",
34+
exports: "readonly",
35+
},
36+
},
37+
rules: {
38+
"no-unused-vars": "off",
39+
"@typescript-eslint/naming-convention": [
40+
"warn",
41+
{
42+
selector: "import",
43+
format: ["camelCase", "PascalCase"],
44+
},
45+
],
46+
curly: "warn",
47+
eqeqeq: "warn",
48+
"no-throw-literal": "warn",
49+
semi: "off",
50+
},
51+
},
52+
{
53+
files: ["src/ui/webview/**/*.js"],
54+
languageOptions: {
55+
ecmaVersion: 2020,
56+
sourceType: "module",
57+
globals: {
58+
document: "readonly",
59+
window: "readonly",
60+
console: "readonly",
61+
acquireVsCodeApi: "readonly",
62+
setTimeout: "readonly",
63+
clearTimeout: "readonly",
64+
MutationObserver: "readonly",
65+
HTMLElement: "readonly",
66+
},
67+
},
68+
rules: {
69+
"no-unused-vars": "off",
70+
curly: "warn",
71+
eqeqeq: "warn",
72+
semi: "off",
73+
},
74+
}
75+
);

0 commit comments

Comments
 (0)