Skip to content

Commit e608db4

Browse files
committed
Add eslint configuration for pr-checks
1 parent 7df3db2 commit e608db4

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

eslint.config.mjs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export default [
2323
"ava.setup.mjs",
2424
"eslint.config.mjs",
2525
".github/**/*",
26-
"pr-checks/**/*",
2726
],
2827
},
2928
// eslint recommended config
@@ -170,4 +169,29 @@ export default [
170169
"func-style": "off",
171170
},
172171
},
172+
{
173+
files: ["pr-checks/**/*.ts"],
174+
175+
languageOptions: {
176+
parserOptions: {
177+
// Use the correct `tsconfig.json` for `pr-checks`.
178+
project: "./pr-checks/tsconfig.json",
179+
},
180+
},
181+
182+
rules: {
183+
// The scripts in `pr-checks` are expected to output to the console.
184+
"no-console": "off",
185+
186+
"@typescript-eslint/no-floating-promises": [
187+
"error",
188+
{
189+
allowForKnownSafeCalls: [
190+
// Avoid needing explicit `void` in front of `describe` calls in test files.
191+
{ from: "package", name: ["describe"], package: "node:test" },
192+
],
193+
},
194+
],
195+
},
196+
},
173197
];

0 commit comments

Comments
 (0)