From 37f40a02235d51187893a7a5a060017d433e25b0 Mon Sep 17 00:00:00 2001 From: Greg McKelvey Date: Tue, 17 Sep 2024 11:46:31 -0700 Subject: [PATCH 1/2] add new rules to base config --- eslint.config.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/eslint.config.js b/eslint.config.js index 67bfcca..33a7cd5 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -34,6 +34,32 @@ export default tsEslint.config( "@typescript-eslint/consistent-type-exports": "error", "@typescript-eslint/no-import-type-side-effects": "error", "@typescript-eslint/consistent-type-imports": "error", + "@typescript-eslint/use-unknown-in-catch-callback-variable": "off", + "@typescript-eslint/restrict-template-expressions": [ + "error", + { + allowAny: true, + allowBoolean: true, + allowNullish: false, + allowNumber: true, + allowRegExp: true, + }, + ], + "@typescript-eslint/no-confusing-void-expression": [ + "error", + { + ignoreArrowShorthand: true, + ignoreVoidOperator: true, + }, + ], + "@typescript-eslint/no-unused-expressions": [ + "error", + { + allowShortCircuit: true, + allowTernary: true, + enforceForJSX: true, + }, + ], }, languageOptions: { globals: { From b70c0adb3da18edf313ea1479b6cdabdda59ae91 Mon Sep 17 00:00:00 2001 From: Greg McKelvey Date: Tue, 17 Sep 2024 11:46:38 -0700 Subject: [PATCH 2/2] fix readme example --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b70b96..439f2e1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ ## Usage ```js -import { baseConfig, reactConfig } from "@20i/eslint-config" +import baseConfig from "@20i/eslint-config" +import reactConfig from "@20i/eslint-config/react" import pluginQuery from "@tanstack/eslint-plugin-query" import tsEslint from "typescript-eslint"