Merge pull request #2039 from modelcontextprotocol/v2/chore/1959-no-floating-promises

chore(lint): enable @typescript-eslint/no-floating-promises in all five ESLint scopes
This commit is contained in:
Cliff Hall 2026-08-16 22:35:52 -04:00 • committed by GitHub
commit 405d0f4d0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,4 +16,22 @@ export default defineConfig([
globals: globals.node,
},
},
{
// Type-aware pass for `no-floating-promises` (#1959). The rule needs type
// information, which `tseslint.configs.recommended` does not provide, and
// the parser needs a project that literally contains the linted file — so
// both of this client's tsconfig projects are listed, exactly as
// `npm run typecheck` runs them (`src` is in the first, `__tests__` only
// in the second).
files: ["**/*.ts"],
languageOptions: {
parserOptions: {
project: ["./tsconfig.json", "./tsconfig.test.json"],
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/no-floating-promises": "error",
},
},
]);