Skip to content

Commit 9810f45

Browse files
cleanup dependencies (#147)
* cleanup root dependencies; cleanup vscode-extension dependencies * fix eslint from working in vscode * fix glob in eslint.config.mjs * remove unused plugin
1 parent f1c6a22 commit 9810f45

File tree

5 files changed

+755
-2134
lines changed

5 files changed

+755
-2134
lines changed

apps/vscode-extension/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,10 @@
8383
"devDependencies": {
8484
"@types/glob": "^8.1.0",
8585
"@types/mocha": "^10.0.10",
86-
"@types/node": "^20.17.7",
87-
"@types/vscode": "^1.70.0",
88-
"@typescript-eslint/eslint-plugin": "^5.31.0",
89-
"@typescript-eslint/parser": "^5.31.0",
90-
"@vscode/test-electron": "^2.4.1",
86+
"@types/node": "^16.11.68",
87+
"@types/vscode": "^1.77.0",
88+
"@vscode/test-electron": "^2.5.2",
9189
"esbuild": "^0.24.0",
92-
"eslint": "^9.15.0",
9390
"glob": "^8.1.0",
9491
"mocha": "^10.8.2",
9592
"npm-run-all": "^4.1.5"

apps/vscode-extension/scripts/build.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ async function main() {
2020
define: production ? { "process.env.NODE_ENV": '"production"' } : undefined,
2121
minify: production,
2222
sourcemap: !production,
23-
plugins: [
24-
nodeDepsPlugin,
25-
workspacePackagesPlugin,
26-
esbuildProblemMatcherPlugin,
27-
],
23+
plugins: [workspacePackagesPlugin, esbuildProblemMatcherPlugin],
2824
});
2925
if (watch) {
3026
await ctx.watch();
@@ -55,22 +51,6 @@ const esbuildProblemMatcherPlugin = {
5551
},
5652
};
5753

58-
/**
59-
* resolve "path" to path-browserify, allows for use of the extension in web environments as well
60-
* @type {import('esbuild').Plugin}
61-
*/
62-
const nodeDepsPlugin = {
63-
name: "node-deps",
64-
setup(build) {
65-
build.onResolve({ filter: /^path$/ }, (args) => {
66-
const path = require.resolve("../node_modules/path-browserify", {
67-
paths: [__dirname],
68-
});
69-
return { path };
70-
});
71-
},
72-
};
73-
7454
/**
7555
* Resolve internal workspace packages to their source files so we bundle them in watch/debug.
7656
* This makes changes in packages/* reflected immediately without separate watchers.

eslint.config.mjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
import eslint from "@eslint/js";
44
import tseslint from "typescript-eslint";
5+
import globals from "globals";
56

67
export default tseslint.config(
78
eslint.configs.recommended,
89
...tseslint.configs.strict,
910
...tseslint.configs.stylistic,
1011
{
11-
ignores: ["scripts/*", "out/*", "dist/*", "test/*", ".vscode-test/*"],
12+
ignores: [
13+
"apps/*/scripts/*",
14+
"apps/*/dist/*",
15+
"packages/*/scripts/*",
16+
"packages/*/dist/*",
17+
"examples/*",
18+
".vscode-test/*",
19+
],
1220
},
1321
{
1422
languageOptions: {
@@ -17,6 +25,9 @@ export default tseslint.config(
1725
ecmaVersion: "latest",
1826
sourceType: "module",
1927
},
28+
globals: {
29+
...globals.node,
30+
},
2031
},
2132
plugins: {
2233
"@typescript-eslint": tseslint.plugin,

0 commit comments

Comments
 (0)