diff --git a/.eslintrc b/.eslintrc index 62b5f9b..2265528 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,8 +9,20 @@ "sourceType": "module" }, "rules": { - "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], - // Turn off ESLint's no-unused-vars in favor of the TypeScript-specific rule - "no-unused-vars": "off" + // TypeScript specific rules + "@typescript-eslint/explicit-function-return-type": ["warn", { "allowExpressions": true }], + "@typescript-eslint/type-annotation-spacing": "error", + + "@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }], + "@typescript-eslint/no-shadow": ["warn"], + "no-unused-vars": "off", + "no-shadow": "off", + + "semi": "error", + // Basic JavaScript/ESLint rules + "eqeqeq": ["error", "always"], + "no-unused-expressions": "warn", + "no-return-await": "error", + "no-console": ["warn", { "allow": ["warn", "error"] }] } } diff --git a/src/api/execution.ts b/src/api/execution.ts index cce979e..4ba6b31 100644 --- a/src/api/execution.ts +++ b/src/api/execution.ts @@ -20,6 +20,7 @@ import { DUNE_CSV_NEXT_OFFSET_HEADER, DUNE_CSV_NEXT_URI_HEADER, } from "../constants"; +import { Response } from "cross-fetch"; // This class implements all the routes defined in the Dune API Docs: https://dune.com/docs/api/ export class ExecutionAPI extends Router { diff --git a/src/utils.ts b/src/utils.ts index 8ceb1c6..9409c4b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,6 +1,6 @@ export const logPrefix = "dune-client:"; -export function sleep(seconds: number) { +export function sleep(seconds: number): Promise { return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); }