Created
May 2, 2022 13:46
-
-
Save phatnguyenuit/6b637503197def963d2349b873326f24 to your computer and use it in GitHub Desktop.
How to sort imports like a pro in TypeScript | .eslintrc.js | sort-import rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// Extends the previous ESLint configuration by adding rules | |
// <--! Previous configuration comes here !--> | |
rules: { | |
'sort-imports': [ | |
'error', | |
{ | |
ignoreCase: false, | |
ignoreDeclarationSort: true, // don"t want to sort import lines, use eslint-plugin-import instead | |
ignoreMemberSort: false, | |
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], | |
allowSeparatedGroups: true, | |
}, | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment