From a9181b43632ded518f01f347318efe2030440e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Fri, 29 Sep 2023 13:56:15 +0200 Subject: [PATCH] fix eslint --- .eslintrc.json | 72 ++++++++++++++------------------------------ tsconfig.eslint.json | 21 ++++++------- 2 files changed, 32 insertions(+), 61 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 99d73c36..bca367e4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,52 +1,26 @@ { - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "standard" - ], - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "env": { "node": true }, - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", - "project": "./tsconfig.eslint.json", - "createDefaultProgram": true - }, - "rules": { - "no-console": "off", - "@typescript-eslint/indent": ["error", 2], - "semi": ["error", "never"], - "import/export": "off" // this errors on multiple exports (overload interfaces) - }, - "overrides": [ - { - "files": ["*.d.ts","*.test-d.ts"], - "rules": { - "no-use-before-define": "off", - "no-redeclare": "off", - "@typescript-eslint/no-explicit-any": "off" - } + "plugins": ["@typescript-eslint"], + "extends": ["eslint:recommended", "standard"], + "overrides": [ + { + "files": ["types/*.test-d.ts", "types/*.d.ts"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": ["./tsconfig.eslint.json"] }, - { - "files": ["*.test-d.ts"], - "rules": { - "no-unused-expressions": "off", - "@typescript-eslint/no-var-requires": "off", - "no-unused-vars": "off", - "n/handle-callback-err": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-misused-promises": ["error", { - "checksVoidReturn": false - }] - }, - "globals": { - "NodeJS": "readonly" - } + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking" + ], + "rules": { + "no-unused-expressions": "off", + "no-use-before-define": "off", + "no-redeclare": "off", + "@typescript-eslint/require-await": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-unused-vars": "off" } - ] - } \ No newline at end of file + } + ] +} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 73430e91..9acea850 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,13 +1,10 @@ { - "compilerOptions": { - "target": "es6", - "lib": [ "es2015", "ES2018" ], - "module": "commonjs", - "noEmit": true, - "strict": true - }, - "include": [ - "types/*.test-d.ts", - "types/*.d.ts" - ] - } \ No newline at end of file + "compilerOptions": { + "target": "es6", + "lib": ["ES2015", "ES2018"], + "module": "commonjs", + "noEmit": true, + "strict": true + }, + "include": ["types/*.test-d.ts", "types/*.d.ts"] +}