From cff11baab391cab8c976ca599839976d7c6d76f5 Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Thu, 8 Aug 2024 15:26:20 +0200 Subject: [PATCH] Rebased branch once more and contained smaller changes due to further review comments --- packages/generator-langium/templates/gitignore.txt | 1 + packages/generator-langium/templates/package.json | 2 +- .../templates/packages/extension/package.json | 5 ++++- packages/generator-langium/test/yeoman-generator.test.ts | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/generator-langium/templates/gitignore.txt b/packages/generator-langium/templates/gitignore.txt index 06e1951c0..d78f76825 100644 --- a/packages/generator-langium/templates/gitignore.txt +++ b/packages/generator-langium/templates/gitignore.txt @@ -8,3 +8,4 @@ out/ **/src/generated syntaxes/ *.tsbuildinfo +*.vsix diff --git a/packages/generator-langium/templates/package.json b/packages/generator-langium/templates/package.json index aa7b19ca9..3a356c31e 100644 --- a/packages/generator-langium/templates/package.json +++ b/packages/generator-langium/templates/package.json @@ -9,7 +9,7 @@ "watch": "tsc -b tsconfig.build.json --watch", "build": "tsc -b tsconfig.build.json && npm run build --workspaces", "build:clean": "npm run clean && npm run build", - "lint": "eslint src --ext ts", + "lint": "eslint {**/src/**/*.ts,**/src/**/*.tsx,**/test/**/*.ts,**/test/**/*.tsx}", "langium:generate": "npm run --workspace packages/language langium:generate", "langium:watch": "npm run --workspace packages/language langium:watch" }, diff --git a/packages/generator-langium/templates/packages/extension/package.json b/packages/generator-langium/templates/packages/extension/package.json index 9c09bd22b..ac065c4af 100644 --- a/packages/generator-langium/templates/packages/extension/package.json +++ b/packages/generator-langium/templates/packages/extension/package.json @@ -28,7 +28,7 @@ "main": "./out/extension/main.cjs", "scripts": { "clean": "shx rm -fr *.tsbuildinfo out syntaxes", - "vscode:prepublish": "npm run build && npm run lint", + "vscode:prepublish": "npm run build && npm run --prefix ../.. lint", "build:prepare": "shx mkdir -p ./syntaxes/ && shx cp -f ../language/syntaxes/<%= language-id %>.tmLanguage.json ./syntaxes/<%= language-id %>.tmLanguage.json", "build": "npm run build:prepare && tsc -b tsconfig.json && node esbuild.mjs", "build:clean": "npm run clean && npm run build", @@ -43,5 +43,8 @@ "@types/vscode": "~1.67.0", "concurrently": "~8.2.2", "esbuild": "~0.23.0" + }, + "vsce": { + "dependencies": false } } diff --git a/packages/generator-langium/test/yeoman-generator.test.ts b/packages/generator-langium/test/yeoman-generator.test.ts index 4e4eb42ac..7396e14bd 100644 --- a/packages/generator-langium/test/yeoman-generator.test.ts +++ b/packages/generator-langium/test/yeoman-generator.test.ts @@ -248,7 +248,7 @@ const PACKAGE_JSON_EXPECTATION: Record = { 'watch': 'tsc -b tsconfig.build.json --watch', 'build': 'tsc -b tsconfig.build.json && npm run build --workspaces', 'build:clean': 'npm run clean && npm run build', - 'lint': 'eslint src --ext ts', + 'lint': 'eslint {**/src/**/*.ts,**/src/**/*.tsx,**/test/**/*.ts,**/test/**/*.tsx}', 'langium:generate': 'npm run --workspace packages/language langium:generate', 'langium:watch': 'npm run --workspace packages/language langium:watch' }, @@ -366,7 +366,7 @@ const PACKAGE_JSON_EXPECTATION_EXTENSION: Record = { main: './out/extension/main.cjs', scripts: { 'clean': 'shx rm -fr *.tsbuildinfo out syntaxes', - 'vscode:prepublish': 'npm run build && npm run lint', + 'vscode:prepublish': 'npm run build && npm run --prefix ../.. lint', 'build:prepare': 'shx mkdir -p ./syntaxes/ && shx cp -f ../language/syntaxes/hello-world.tmLanguage.json ./syntaxes/hello-world.tmLanguage.json', 'build': 'npm run build:prepare && tsc -b tsconfig.json && node esbuild.mjs', 'build:clean': 'npm run clean && npm run build',