Skip to content

Sorters for editing javascript file

Notifications You must be signed in to change notification settings

cloudyster/jssorter

Repository files navigation

Sorters for editing javascript file

Implemented sorters:

  • Lines sorter
  • Switch cases sorter
  • Javascript imports sorter

How to Install

Search JSSorter in the Intellij's plugin dialog. Or Download the jar and in the plugin dialog choose Install plugin from disk.

Lines sorter

Sort selected lines alphabetically.

How to Use It

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.

Switch cases sorter

Sort switch cases alphabetically.

How to Use It

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.

Javascript imports sorter

Sort javascript imports. See ESlint sort-imports

How to Use It

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.

When Not To Use It

😈 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.

About

Sorters for editing javascript file

Resources

Stars

Watchers

Forks