Implemented sorters:
- Lines sorter
- Switch cases sorter
- Javascript imports sorter
Search JSSorter in the Intellij's plugin dialog. Or Download the jar and in the plugin dialog choose Install plugin from disk.
Sort selected lines alphabetically.
Select the lines you want to sort, then you will find a new Sort Selected Lines option under the Code menu. Or hit Shift+Alt+N.
Sort switch cases alphabetically.
Place the cursor under the switch word, then you will find a new Sort Switch Cases under the Code menu. Or hit Shift+Alt+S.
Sort javascript imports. See ESlint sort-imports
When you're editing a js file, you will find a new Sort JS Import option under the Code menu. Or hit Shift+Alt+J.
😈 You use require, but not import.
😈 You have multi-line imports.
import {
AppRegistry,
StyleSheet,
Text } from 'react-native';
😈 Alphabetizing imports isn’t a part of your coding standards.