diff --git a/.github/workflows/build-test-web.yml b/.github/workflows/build-test-web.yml index d0f7640c7..3c752a4e2 100644 --- a/.github/workflows/build-test-web.yml +++ b/.github/workflows/build-test-web.yml @@ -45,7 +45,7 @@ jobs: - run: yarn xstate:typegen - run: yarn tsc - name: Lint - run: yarn eslint --max-warnings 0 src e2e + run: yarn eslint --max-warnings 0 src e2e packages/codemirror-lsp-client check-typos: diff --git a/package.json b/package.json index 763881845..8a63377ad 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "build:wasm": "yarn wasm-prep && cd src/wasm-lib && wasm-pack build --release --target web --out-dir pkg && cargo test -p kcl-lib export_bindings && cd ../.. && yarn isomorphic-copy-wasm && yarn fmt", "remove-importmeta": "sed -i 's/import.meta.url/window.location.origin/g' \"./src/wasm-lib/pkg/wasm_lib.js\"; sed -i '' 's/import.meta.url/window.location.origin/g' \"./src/wasm-lib/pkg/wasm_lib.js\" || echo \"sed for both mac and linux\"", "wasm-prep": "rimraf src/wasm-lib/pkg && mkdirp src/wasm-lib/pkg && rimraf src/wasm-lib/kcl/bindings", - "lint": "eslint --fix src e2e", + "lint": "eslint --fix src e2e packages/codemirror-lsp-client", "bump-jsons": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json", "postinstall": "yarn xstate:typegen && ./node_modules/.bin/electron-rebuild", "xstate:typegen": "yarn xstate typegen \"src/**/*.ts?(x)\"", diff --git a/packages/codemirror-lsp-client/src/plugin/lsp.ts b/packages/codemirror-lsp-client/src/plugin/lsp.ts index c8bafceae..c7ae37641 100644 --- a/packages/codemirror-lsp-client/src/plugin/lsp.ts +++ b/packages/codemirror-lsp-client/src/plugin/lsp.ts @@ -532,7 +532,9 @@ export class LanguageServerPlugin implements PluginValue { processDiagnostics(params: PublishDiagnosticsParams) { if (params.uri !== this.getDocUri()) return - const diagnostics = params.diagnostics + // Commented to avoid the lint. See TODO below. + // const diagnostics = + params.diagnostics .map(({ range, message, severity }) => ({ from: posToOffset(this.view.state.doc, range.start)!, to: posToOffset(this.view.state.doc, range.end)!,