From 6f1706aa23a5196ec32e3132cf63e6d05fcb5210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=97=D0=BB=20=D0=93=D1=80=D0=B8?= =?UTF-8?q?=D0=B3=D0=BE=D1=80=27=D1=94=D0=B2?= Date: Wed, 19 Jun 2024 12:25:13 +0300 Subject: [PATCH] Modify ESLint configuration Fix minimatch patterns, disable no-unused-vars entirely, stop calling tsc in the lint script. --- eslint.config.js | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 0a1ae594..23e61a01 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -41,9 +41,8 @@ const runtimeConfig = tseslint.config(...baseConfig, { }, }, rules: { - // Mostly caused by JSDoc imports, so don't annoy with errors but keep - // a reminder! - "@typescript-eslint/no-unused-vars": "warn", + // Mostly caused by JSDoc imports, disable for now + "@typescript-eslint/no-unused-vars": "off", // FIXME: enforce when we're ready to "prefer-const": "warn", }, @@ -56,11 +55,11 @@ export default [ }, ...nodeConfig.map(config => ({ ...config, - files: ["*.(ts|js)", "(gulp|electron)/**/*.(ts|js)"], + files: ["*.{ts,js}", "{gulp,electron}/**/*.{ts,js}"], ignores: ["gulp/preloader/*.js"], })), ...runtimeConfig.map(config => ({ ...config, - files: ["src/**/*.(ts|js)x?"], + files: ["src/**/*.{ts,js,tsx,jsx}"], })), ]; diff --git a/package.json b/package.json index ddec7986..1fdff589 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "type": "module", "scripts": { "gulp": "gulp --cwd gulp", - "lint": "(eslint . && tsc && tsc -p src) || (tsc && tsc -p src) || tsc -p src", + "lint": "eslint .", "prettier-all": "prettier --write src/**/*.* && prettier --write gulp/**/*.*", "buildTypes": "tsc src/js/application.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --out types.js", "package-win32-x64": "gulp --cwd gulp package.standalone-steam.win32-x64",