Skip to content

Commit 443f363

Browse files
fix(eslint-config): handle non-typechecked files without breaking (#107)
1 parent fed566a commit 443f363

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/eslint-plugin/lib/configs/recommended.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const recommendedConfig = defineConfig({
4141
"@typescript-eslint/no-unused-vars": "off",
4242
"unused-imports/no-unused-imports": "error",
4343
"unused-imports/no-unused-vars": "error",
44-
"@typescript-eslint/no-floating-promises": "error",
44+
// ☢️ Rules that require type information must be added to the `.ts` overrides section below
4545
},
4646
env: {
4747
node: true,
@@ -54,8 +54,6 @@ export const recommendedConfig = defineConfig({
5454
ecmaFeatures: {
5555
jsx: true,
5656
},
57-
// Introduced to define the parserOptions.project property for @typescript-eslint/no-floating-promises
58-
project: ["tsconfig.json"],
5957
},
6058
settings: {
6159
react: {
@@ -69,9 +67,9 @@ export const recommendedConfig = defineConfig({
6967
project: "tsconfig.json",
7068
},
7169
rules: {
72-
// Note: disable the base rule as it can report incorrect errors
73-
"no-return-await": "off",
70+
"no-return-await": "off", // Disable the base rule as it can report incorrect errors
7471
"@typescript-eslint/return-await": "error",
72+
"@typescript-eslint/no-floating-promises": "error",
7573
},
7674
},
7775
],

0 commit comments

Comments
 (0)