Skip to content

Commit

Permalink
@typescript-eslint/consistent-type-imports: Add option to prefer in…
Browse files Browse the repository at this point in the history
…line type imports

Fixes #64
  • Loading branch information
sindresorhus committed Nov 16, 2022
1 parent 3ec1f94 commit e41f4a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion index.js
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -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"
}
Expand Down

0 comments on commit e41f4a4

Please sign in to comment.