From 1409202af2e89c31b67c06e765669291e9cc328b Mon Sep 17 00:00:00 2001 From: diba1013 <diba1013@web.de> Date: Fri, 5 Jan 2024 18:57:42 +0100 Subject: [PATCH] fix: typescript style messing with type definitions Signed-off-by: diba1013 <diba1013@web.de> --- packages/eslint-config/src/recommended.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/eslint-config/src/recommended.js b/packages/eslint-config/src/recommended.js index 1bcfcc3..6fbdb45 100644 --- a/packages/eslint-config/src/recommended.js +++ b/packages/eslint-config/src/recommended.js @@ -87,8 +87,7 @@ export function defineConfig({ ], }, { - pathPattern: - "^(?:dev|peer|optional|bundled)?[Dd]ependencies$", + pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$", order: { type: "asc" }, }, ], @@ -144,12 +143,7 @@ export function defineConfig({ { type: "natural", groups: [ - [ - "internal-type", - "parent-type", - "sibling-type", - "index-type", - ], + ["internal-type", "parent-type", "sibling-type", "index-type"], ["node-type"], ["type", "builtin-type"], ["internal", "parent", "sibling", "index"], @@ -216,6 +210,12 @@ export function defineConfig({ ...typescript.configs["recommended-type-checked"].rules, ...typescript.configs.stylistic.rules, ...typescript.configs["stylistic-type-checked"].rules, + + /** + * Prefer types whenever possible + * https://typescript-eslint.io/rules/consistent-type-definitions/ + */ + "@typescript-eslint/consistent-type-definitions": ["warn", "type"], }, }, // Vue