Enable projectService for TypeScript files in eslint config
Enabling this is required for rules that need to use the types as
resolved by the TypeScript compiler.
The no-floating-promises rule was missing some stuff due to missing
types, so this CL resolves that too. Also, return-await kicked up more
stuff.
A warm run of `npm run lint` went from ~23s to ~35s on my M1 Mac.
Bug: 406518012
Change-Id: I0c413e2ca14ee903851fd8404e490335c7f8aae0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6397499
Reviewed-by: Nikolay Vitkov <[email protected]>
Reviewed-by: Benedikt Meurer <[email protected]>
Reviewed-by: Jack Franklin <[email protected]>
Commit-Queue: Nikolay Vitkov <[email protected]>
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 711f050..2ccecc7 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -63,6 +63,8 @@
'front_end/third_party/puppeteer-replay/**/*.ts',
// Third party code we did not author for extensions
'extensions/cxx_debugging/third_party/**/*',
+ // Not in tsconfig project.
+ 'extension-api/ExtensionAPI.d.ts',
'**/node_modules',
'scripts/build/typescript/tests',
@@ -315,6 +317,7 @@
parser: tsParser,
parserOptions: {
allowAutomaticSingleRunInference: true,
+ projectService: true,
project: join(
import.meta.dirname,
'config',