From bf6074824f49996f89357eaed4c03a2d501e4b52 Mon Sep 17 00:00:00 2001 From: james-a-morris Date: Thu, 7 Sep 2023 11:30:29 -0400 Subject: [PATCH] chore: enable linting for promises --- .eslintrc.js | 3 +++ tsconfig.eslint.json | 10 ++++++++++ tsconfig.json | 2 +- tsconfig.test.json | 1 - 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 tsconfig.eslint.json diff --git a/.eslintrc.js b/.eslintrc.js index 8156c11f4..dd1052aae 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,6 +16,7 @@ module.exports = { parser: "@typescript-eslint/parser", parserOptions: { ecmaVersion: 12, + project: "./tsconfig.eslint.json", }, rules: { "prettier/prettier": ["warn"], @@ -35,6 +36,8 @@ module.exports = { "@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }], "chai-expect/missing-assertion": 2, "no-duplicate-imports": "error", + // "require-await": "error", + "@typescript-eslint/no-floating-promises": ["error"], }, settings: { node: { diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 000000000..a5e062b25 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "./src", + "index.ts", + "./scripts", + "./test", + ".eslintrc.js" // ESLint's config must be included + ] +} diff --git a/tsconfig.json b/tsconfig.json index 965f90a0b..018e1ff70 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "strictNullChecks": false, "noImplicitAny": false }, - "include": ["./src", "index.ts", "./scripts", "./test"], + "include": ["./src", "index.ts", "./scripts"], "files": ["./hardhat.config.ts"], "watchOptions": { "watchFile": "useFsEventsOnParentDirectory", diff --git a/tsconfig.test.json b/tsconfig.test.json index 0fdfad4bb..d4985cb9b 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -1,7 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "strict": false }, "include": ["./test", "./src"] }