Skip to content

Commit e41f4a4

Browse files
committed
@typescript-eslint/consistent-type-imports: Add option to prefer inline type imports
Fixes #64
1 parent 3ec1f94 commit e41f4a4

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,12 @@ module.exports = {
221221
fixMixedExportsWithInlineTypeSpecifier: true
222222
}
223223
],
224-
'@typescript-eslint/consistent-type-imports': 'error',
224+
'@typescript-eslint/consistent-type-imports': [
225+
'error',
226+
{
227+
fixStyle: 'inline-type-imports'
228+
}
229+
],
225230

226231
// Disabled because it's too annoying. Enable it when it's more mature, smarter, and more flexible.
227232
// https://github.com/typescript-eslint/typescript-eslint/search?q=%22explicit-function-return-type%22&state=open&type=Issues

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
"simple"
4545
],
4646
"devDependencies": {
47-
"@typescript-eslint/eslint-plugin": "^5.41.0",
48-
"@typescript-eslint/parser": "^5.41.0",
47+
"@typescript-eslint/eslint-plugin": "^5.43.0",
48+
"@typescript-eslint/parser": "^5.43.0",
4949
"ava": "^2.4.0",
5050
"eslint": "^7.8.1",
5151
"typescript": ">=4.4"
5252
},
5353
"peerDependencies": {
54-
"@typescript-eslint/eslint-plugin": ">=5.41.0",
55-
"@typescript-eslint/parser": ">=5.41.0",
54+
"@typescript-eslint/eslint-plugin": ">=5.43.0",
55+
"@typescript-eslint/parser": ">=5.43.0",
5656
"eslint": ">=8.0.0",
5757
"typescript": ">=4.4"
5858
}

0 commit comments

Comments
 (0)