diff --git a/packages/vscode-integration-webview/.eslintrc.js b/.eslintrc.js similarity index 72% rename from packages/vscode-integration-webview/.eslintrc.js rename to .eslintrc.js index 2af1914..6c900bf 100644 --- a/packages/vscode-integration-webview/.eslintrc.js +++ b/.eslintrc.js @@ -1,9 +1,12 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { + root: true, extends: '@eclipse-glsp', + ignorePatterns: ['**/{node_modules,lib}', '**/.eslintrc.js'], + parserOptions: { tsconfigRootDir: __dirname, - project: 'tsconfig.json' + project: 'tsconfig.eslint.json' }, rules: { 'no-restricted-imports': [ @@ -15,7 +18,7 @@ module.exports = { { name: 'sprotty-protocol', message: - "The sprotty-protocol default exports are customized and reexported by GLSP. Please use '@eclipse-glsp/client' instead" + "The sprotty-protocol default exports are customized and reexported by GLSP. Please use '@eclipse-glsp/protocol' or '@eclipse-glsp/client' instead" } ] } diff --git a/example/workflow/extension/.eslintrc.js b/example/workflow/extension/.eslintrc.js index 008c0be..cb55cce 100644 --- a/example/workflow/extension/.eslintrc.js +++ b/example/workflow/extension/.eslintrc.js @@ -1,10 +1,6 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { - extends: '@eclipse-glsp', - parserOptions: { - tsconfigRootDir: __dirname, - project: 'tsconfig.json' - }, + extends: '../../../.eslintrc.js', rules: { 'import/no-unresolved': 'off' } diff --git a/example/workflow/extension/package.json b/example/workflow/extension/package.json index ab64e95..546677c 100644 --- a/example/workflow/extension/package.json +++ b/example/workflow/extension/package.json @@ -198,7 +198,8 @@ "prepare": "yarn clean && yarn build && yarn lint", "clean": "rimraf lib tsconfig.tsbuildinfo", "watch": "tsc -w", - "lint": "eslint -c ./.eslintrc.js --ext .ts ./src", + "lint": "eslint --ext .ts,.tsx ./src", + "lint:fix": "eslint --fix --ext .ts,.tsx ./src", "build": "tsc && yarn download:Server", "publish": "vsce publish", "download:Server": "ts-node ../scripts/download.ts" diff --git a/example/workflow/webview/.eslintrc.js b/example/workflow/webview/.eslintrc.js deleted file mode 100644 index 727bf62..0000000 --- a/example/workflow/webview/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: '@eclipse-glsp', - parserOptions: { - tsconfigRootDir: __dirname, - project: 'tsconfig.json' - } -}; diff --git a/example/workflow/webview/package.json b/example/workflow/webview/package.json index e8106d5..01ad6ff 100644 --- a/example/workflow/webview/package.json +++ b/example/workflow/webview/package.json @@ -46,7 +46,8 @@ "prepare": "yarn clean && yarn build && yarn lint", "clean": "rimraf lib ../extension/pack tsconfig.tsbuildinfo", "build": "tsc && webpack --mode=development", - "lint": "eslint -c ./.eslintrc.js --ext .ts ./src", + "lint": "eslint --ext .ts,.tsx ./src", + "lint:fix": "eslint --fix --ext .ts,.tsx ./src", "watch": "tsc -w" } } diff --git a/packages/vscode-integration-webview/package.json b/packages/vscode-integration-webview/package.json index 7ace21e..e0d7d25 100644 --- a/packages/vscode-integration-webview/package.json +++ b/packages/vscode-integration-webview/package.json @@ -43,7 +43,8 @@ "clean": "rimraf lib tsconfig.tsbuildinfo", "build": "tsc", "watch": "tsc -w", - "lint": "eslint -c ./.eslintrc.js --ext .ts ./src" + "lint": "eslint --ext .ts,.tsx ./src", + "lint:fix": "eslint --fix --ext .ts,.tsx ./src" }, "publishConfig": { "access": "public" diff --git a/packages/vscode-integration/.eslintrc.js b/packages/vscode-integration/.eslintrc.js index 008c0be..6eea04a 100644 --- a/packages/vscode-integration/.eslintrc.js +++ b/packages/vscode-integration/.eslintrc.js @@ -1,10 +1,6 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { - extends: '@eclipse-glsp', - parserOptions: { - tsconfigRootDir: __dirname, - project: 'tsconfig.json' - }, + extends: '../../.eslintrc.js', rules: { 'import/no-unresolved': 'off' } diff --git a/packages/vscode-integration/package.json b/packages/vscode-integration/package.json index 1d048c4..44bd52d 100644 --- a/packages/vscode-integration/package.json +++ b/packages/vscode-integration/package.json @@ -46,7 +46,8 @@ "clean": "rimraf lib tsconfig.tsbuildinfo", "build": "tsc", "watch": "tsc -w", - "lint": "eslint -c ./.eslintrc.js --ext .ts ./src" + "lint": "eslint --ext .ts,.tsx ./src", + "lint:fix": "eslint --fix --ext .ts,.tsx ./src" }, "publishConfig": { "access": "public" diff --git a/packages/vscode-integration/src/quickstart-components/configuration-util.ts b/packages/vscode-integration/src/quickstart-components/configuration-util.ts index a00c1e1..abfa5d0 100644 --- a/packages/vscode-integration/src/quickstart-components/configuration-util.ts +++ b/packages/vscode-integration/src/quickstart-components/configuration-util.ts @@ -13,8 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { CenterAction, FitToScreenAction, LayoutOperation, RequestExportSvgAction } from '@eclipse-glsp/protocol'; -import { SelectAllAction } from 'sprotty-protocol'; +import { CenterAction, FitToScreenAction, LayoutOperation, RequestExportSvgAction, SelectAllAction } from '@eclipse-glsp/protocol'; import * as vscode from 'vscode'; import { GlspVscodeConnector } from '../glsp-vscode-connector'; diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 0000000..e1ec2c6 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,8 @@ +{ + "extends": "@eclipse-glsp/ts-config/tsconfig.json", + "compilerOptions": { + "noEmit": true + }, + "exclude": ["**/node_modules", "**/.eslintrc.js"], + "include": ["packages/*/src", "example/**/*/src", "**/scripts/"] +} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 28c6a6e..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@eclipse-glsp/ts-config/tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@eclipse-glsp/vscode-integration": ["vscode-extension/src/*"] - } - } -}