From 583b300cd731b218db3bb93ba3291b4cd3744e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Thu, 5 Oct 2023 21:58:14 +0200 Subject: [PATCH] fix eslint --- .eslintrc.json | 73 +++++++++++++++----------------------------- tsconfig.eslint.json | 21 ++++++------- 2 files changed, 34 insertions(+), 60 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 60822b4..1a3b777 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,51 +1,28 @@ { - "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": { - "@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-use-before-define": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unused-vars": "off" } - ] - } \ No newline at end of file + } + ] +} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 3b9ddea..9acea85 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,13 +1,10 @@ { - "compilerOptions": { - "target": "es6", - "lib": [ "es2015" ], - "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"] +}