From e41f4a4032882da4f19d4ff69d303f8a1f2e127d Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 8 Nov 2022 16:18:48 +0700 Subject: [PATCH] `@typescript-eslint/consistent-type-imports`: Add option to prefer inline type imports Fixes #64 --- index.js | 7 ++++++- package.json | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index f077771..7015ace 100644 --- a/index.js +++ b/index.js @@ -221,7 +221,12 @@ module.exports = { fixMixedExportsWithInlineTypeSpecifier: true } ], - '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/consistent-type-imports': [ + 'error', + { + fixStyle: 'inline-type-imports' + } + ], // Disabled because it's too annoying. Enable it when it's more mature, smarter, and more flexible. // https://github.com/typescript-eslint/typescript-eslint/search?q=%22explicit-function-return-type%22&state=open&type=Issues diff --git a/package.json b/package.json index 7bc4a6c..4ee794c 100644 --- a/package.json +++ b/package.json @@ -44,15 +44,15 @@ "simple" ], "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.41.0", - "@typescript-eslint/parser": "^5.41.0", + "@typescript-eslint/eslint-plugin": "^5.43.0", + "@typescript-eslint/parser": "^5.43.0", "ava": "^2.4.0", "eslint": "^7.8.1", "typescript": ">=4.4" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": ">=5.41.0", - "@typescript-eslint/parser": ">=5.41.0", + "@typescript-eslint/eslint-plugin": ">=5.43.0", + "@typescript-eslint/parser": ">=5.43.0", "eslint": ">=8.0.0", "typescript": ">=4.4" }