Skip to content

Commit cecffb1

Browse files
Copilotfelickz
andauthored
fix: TypeScript 6 and ESLint 10 compatibility for dependency upgrades
Agent-Logs-Url: https://github.com/advanced-security/codeql-scanner-vscode/sessions/b27799dc-179e-44b8-a85c-8fef455bae44 Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
1 parent 4259642 commit cecffb1

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111
- Updated TypeScript compilation target and lib from `ES2020` to `ES2022` to support `ErrorOptions` type used by updated `@octokit/request-error` dependency
12+
- Added explicit `types: ["node", "vscode"]` to `tsconfig.json` for TypeScript 6 compatibility (TypeScript 6 no longer implicitly includes `@types/node`)
13+
- Migrated ESLint configuration from `.eslintrc.json` to `eslint.config.js` (flat config) for ESLint 10 compatibility
1214

1315
## [0.1.0] - 2025-06-26
1416

eslint.config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// @ts-check
2+
const tseslint = require("@typescript-eslint/eslint-plugin");
3+
const tsparser = require("@typescript-eslint/parser");
4+
5+
/** @type {import("eslint").Linter.Config[]} */
6+
module.exports = [
7+
{
8+
ignores: ["out/**", "dist/**", "**/*.d.ts"],
9+
},
10+
{
11+
files: ["src/**/*.ts"],
12+
languageOptions: {
13+
parser: tsparser,
14+
parserOptions: {
15+
ecmaVersion: 6,
16+
sourceType: "module",
17+
},
18+
},
19+
plugins: {
20+
"@typescript-eslint": tseslint,
21+
},
22+
rules: {
23+
"@typescript-eslint/naming-convention": [
24+
"warn",
25+
{
26+
selector: "import",
27+
format: ["camelCase", "PascalCase"],
28+
},
29+
],
30+
curly: "warn",
31+
eqeqeq: "warn",
32+
"no-throw-literal": "warn",
33+
semi: "off",
34+
},
35+
},
36+
];

tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
],
99
"sourceMap": true,
1010
"rootDir": "src",
11-
"strict": true
11+
"strict": true,
12+
"types": [
13+
"node",
14+
"vscode"
15+
]
1216
},
1317
"exclude": [
1418
"node_modules",

0 commit comments

Comments
 (0)