Skip to content

CGQAQ/eslint-plugin-better-align

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-better-align

eslint-plugin-better-align/import-align

Before

import a from "a";
import bb from "b";
import ccc from "c";
import    "d";
import {
    xxx,
    yyy,
    zzz,
}    from "e";

After

import a   from "a";
import bb  from "b";
import ccc from "c";
import "d"; // Redundent spacing in from side effect import statement are stripped for now.
import {
    xxx,
    yyy,
    zzz,
}    from "e";  // Multiline import statement are ignored for now.

Usage:

  1. Install the plugin
yarn add -D eslint-plugin-better-align
  1. In your eslint config file, adding:
...
"plugins": [
    "better-align",
],
"rules": {
    "better-align/import-align": [2, "always"],
},
...

About

Align the 'from' vertically

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published