Add eslint configuration for pr-checks

This commit is contained in:
Michael B. Gale
2026-03-12 17:39:53 +00:00
parent 7df3db2b6f
commit e608db4784
+25 -1
View File
@@ -23,7 +23,6 @@ export default [
"ava.setup.mjs",
"eslint.config.mjs",
".github/**/*",
"pr-checks/**/*",
],
},
// eslint recommended config
@@ -170,4 +169,29 @@ export default [
"func-style": "off",
},
},
{
files: ["pr-checks/**/*.ts"],
languageOptions: {
parserOptions: {
// Use the correct `tsconfig.json` for `pr-checks`.
project: "./pr-checks/tsconfig.json",
},
},
rules: {
// The scripts in `pr-checks` are expected to output to the console.
"no-console": "off",
"@typescript-eslint/no-floating-promises": [
"error",
{
allowForKnownSafeCalls: [
// Avoid needing explicit `void` in front of `describe` calls in test files.
{ from: "package", name: ["describe"], package: "node:test" },
],
},
],
},
},
];