mirror of
https://github.com/github/codeql-action.git
synced 2026-05-02 11:50:08 +00:00
Add eslint configuration for pr-checks
This commit is contained in:
+25
-1
@@ -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" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user