Skip to content

Commit f6b33e4

Browse files
committed
Upgrade project scripts and development tools.
1 parent a651f9e commit f6b33e4

File tree

10 files changed

+113
-73
lines changed

10 files changed

+113
-73
lines changed

.eslintrc.json

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

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
out
2-
dist
32
node_modules
43
package-lock.json
5-
.vscode-test/
64
*.vsix

.vscode-test.mjs

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

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": [
9+
"--extensionDevelopmentPath=${workspaceFolder}",
10+
"${workspaceFolder}/test"
11+
],
12+
"outFiles": [
13+
"${workspaceFolder}/out/**/*.js"
14+
],
15+
"preLaunchTask": "npm: esbuild:watch"
16+
},
17+
]
18+
}

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"typescript.tsc.autoDetect": "off",
3+
"eslint.useFlatConfig": true,
4+
"[typescript]": {
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll": "explicit",
7+
}
8+
},
9+
}

.vscode/tasks.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "esbuild:watch",
7+
"problemMatcher": "$esbuild-watch",
8+
"isBackground": true,
9+
"presentation": {
10+
"reveal": "never"
11+
},
12+
"group": {
13+
"kind": "build"
14+
}
15+
}
16+
]
17+
}

.vscodeignore

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
.vscode/**
2-
.vscode-test/**
3-
src/**
4-
.gitignore
5-
.yarnrc
6-
**/tsconfig.json
7-
**/.eslintrc.json
8-
**/*.map
9-
**/*.ts
10-
**/.vscode-test.*
1+
**
2+
!out/**
3+
!media/**
4+
!LICENSE*
5+
!README*
6+
!CHANGELOG*

eslint.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = [
2+
{
3+
'name': 'root',
4+
'files': [
5+
'src/**/*.ts'
6+
],
7+
'languageOptions': {
8+
'ecmaVersion': 6,
9+
'sourceType': 'module',
10+
'parser': require('@typescript-eslint/parser'),
11+
},
12+
'plugins': {
13+
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
14+
},
15+
'rules': {
16+
'semi': 'error',
17+
'no-throw-literal': 'error',
18+
'curly': 'warn',
19+
'eqeqeq': 'warn',
20+
'@typescript-eslint/naming-convention': [
21+
'warn',
22+
{
23+
'selector': 'import',
24+
'format': [ 'camelCase', 'PascalCase' ]
25+
}
26+
],
27+
},
28+
}
29+
];

package.json

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
2+
"publisher": "amaranth-lang",
23
"name": "rtl-debugger",
34
"displayName": "RTL Debugger",
45
"description": "Debugger for HDLs supported by the open-source toolchain: Amaranth, Verilog, VHDL, ...",
56
"version": "0.0.0",
6-
"engines": {
7-
"vscode": "^1.84.0"
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/amaranth-lang/rtl-debugger"
810
},
911
"categories": [
1012
"Debuggers"
1113
],
12-
"activationEvents": [],
14+
"engines": {
15+
"vscode": "^1.94.0"
16+
},
1317
"main": "./out/extension.js",
1418
"contributes": {
1519
"configuration": {
@@ -19,7 +23,9 @@
1923
"$comment": "UPSTREAM: Unfortunately there is no way to control the formatting of the extension name within the setting title. See microsoft/vscode#103592",
2024
"properties": {
2125
"rtlDebugger.command": {
22-
"type": ["array"],
26+
"type": [
27+
"array"
28+
],
2329
"items": {
2430
"type": "string"
2531
},
@@ -39,7 +45,11 @@
3945
"description": "Specifies the port that the CXXRTL agent within the debug session is listening at."
4046
},
4147
"rtlDebugger.displayStyle": {
42-
"enum": ["Verilog", "VHDL", "Python"],
48+
"enum": [
49+
"Verilog",
50+
"VHDL",
51+
"Python"
52+
],
4353
"default": "Verilog",
4454
"markdownDescription": "Specifies the display format for variables."
4555
}
@@ -183,22 +193,22 @@
183193
}
184194
},
185195
"scripts": {
186-
"compile": "tsc -p ./",
187-
"watch": "tsc -watch -p ./",
188-
"lint": "eslint src --ext ts",
189-
"pretest": "npm run compile && npm run lint",
190-
"test": "vscode-test",
191-
"vscode:prepublish": "npm run compile"
196+
"lint": "eslint --fix",
197+
"tsc": "tsc --project tsconfig.json",
198+
"tsc:watch": "npm run tsc -- --watch",
199+
"esbuild": "esbuild ./src/extension.ts --bundle --sourcemap --outdir=out/ --format=cjs --platform=node --external:vscode",
200+
"esbuild:watch": "npm run esbuild -- --watch",
201+
"vscode:prepublish": "npm run lint && npm run tsc && npm run esbuild",
202+
"package": "vsce package"
192203
},
193204
"devDependencies": {
194-
"@types/vscode": "^1.84.0",
195-
"@types/mocha": "^10.0.6",
196-
"@types/node": "18.x",
197-
"@typescript-eslint/eslint-plugin": "^6.13.1",
198-
"@typescript-eslint/parser": "^6.13.1",
199-
"eslint": "^8.54.0",
200-
"typescript": "^5.3.2",
201-
"@vscode/test-cli": "^0.0.4",
202-
"@vscode/test-electron": "^2.3.8"
205+
"@types/node": "20.x",
206+
"@types/vscode": "^1.94",
207+
"@typescript-eslint/eslint-plugin": "^8",
208+
"@typescript-eslint/parser": "^8",
209+
"esbuild": "^0.24",
210+
"eslint": "^9.12",
211+
"typescript": "5.5.x",
212+
"@vscode/vsce": "^3.x"
203213
}
204214
}

tsconfig.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{
22
"compilerOptions": {
3-
"module": "Node16",
3+
"module": "CommonJS",
4+
"esModuleInterop": true,
45
"target": "ES2022",
5-
"outDir": "out",
6-
"lib": [
7-
"ES2022"
8-
],
9-
"sourceMap": true,
6+
"moduleResolution": "Node",
107
"rootDir": "src",
8+
"noEmit": true,
119
"strict": true,
1210
"noImplicitReturns": true,
1311
"noImplicitAny": true,

0 commit comments

Comments
 (0)