/moka-format

VS Code extension for sorting ES6 imports and css automatically used in Moka internally

Primary LanguageTypeScript

Moka format

VS Code auto format extension used by Moka

Usage

1. Manually sort imports

Command - "Moka sort imports"

Not only do the sorting, the extension will also help to merge same imports.

For example:

import a, { b, c } from 'A';
import { d, c, e } from 'A';
import { f, g } from 'A';

=>

import a, { b, c, d ,e, f, g } from 'A';

2. Sort imports on save

Setup as below:

then imports will be formatted automatically:

3. Manually sort css

Command - "Moka sort css"

Sorry, there is no sort css on save option

Rules