bazelbuild / vscode-bazel

Bazel support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel
Apache License 2.0
231 stars 76 forks source link

ci: Fix eslint integration #373

Closed vogelsgesang closed 3 months ago

vogelsgesang commented 3 months ago

In #363, I accidentally disabled all eslint checks: I used eslint and thought this would actually run the linter on the complete source tree. Starting from ESLint 9.0, this will actually work (See https://eslint.org/blog/2024/04/eslint-v9.0.0-released/#running-eslint-with-no-file-arguments). But for ESLint 8.x, we still need to use eslint .

This commit fixes that oversight in package.json and rectifies all the fall-out from this mistake.

First, I finished the migration to the new eslint.config.js format. To avoid further bugs, I first enabled TypeScript's type checking via @ts-check. I then followed the migration guide from https://eslint.org/docs/latest/use/configure/migration-guide to fix the config in general.

Doing so, I changed a the linter config in the following way:

With that out-of-the way, I had to fix the actual lint warnings: