From 0fd81016c1347a301f649246016c0aa37f4d2f95 Mon Sep 17 00:00:00 2001 From: Christian Bager Bach Houmann Date: Fri, 24 Mar 2023 10:42:26 +0100 Subject: [PATCH] chore: stricter eslint using typescript-eslint --- .eslintrc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.eslintrc b/.eslintrc index 21914b7..22557f2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,22 +1,31 @@ { + "overrides": [ + { + "extends": ["plugin:@typescript-eslint/recommended-requiring-type-checking"], + "files": ["*.ts"], + "parserOptions": { + "project": ["./tsconfig.json"] + } + } + ], "root": true, "parser": "@typescript-eslint/parser", "env": { "node": true }, "plugins": ["@typescript-eslint"], "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended" ], "parserOptions": { - "sourceType": "module" + "sourceType": "module", + "project": "./tsconfig.json" }, "rules": { "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], "@typescript-eslint/ban-ts-comment": "off", "no-prototype-builtins": "off", - "@typescript-eslint/no-empty-function": "off" + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/consistent-type-imports": "warn" }, "ignorePatterns": ["node_modules/", "main.js"] }