eslint-plugin-beautiful-sort
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "eslint-plugin-beautiful-sort", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "eslint plugin for import sort", | ||
@@ -19,3 +19,7 @@ "main": "src/index.js", | ||
}, | ||
"keywords": ["eslint", "import", "import-sort"], | ||
"keywords": [ | ||
"eslint", | ||
"import", | ||
"import-sort" | ||
], | ||
"author": "https://github.com/Allohamora", | ||
@@ -22,0 +26,0 @@ "license": "ISC", |
# eslint-plugin-beautiful-sort | ||
## eslint plugin for es6 imports sort by order like eslnt/sort-imports with fix option | ||
```usage: "beautiful-sort/import": [2, { "special": ["react"] }, "order": ["special", "default", "defaultObj", "obj", "none"] ]``` | ||
eslint plugin for es6 imports sort by order like eslnt/sort-imports with fix option | ||
## Working | ||
From | ||
```js | ||
import './Test.css'; | ||
import {a,b,c} from 'a'; | ||
import A from 'g'; | ||
import React from 'react'; | ||
``` | ||
To | ||
```js | ||
import React from 'react'; | ||
import A from 'g'; | ||
import {a,b,c} from 'a'; | ||
import './Test.css'; | ||
``` | ||
## Usage | ||
`npm i -D eslint-plugin-beautiful-sort` | ||
```json | ||
{ | ||
"plugins": [ | ||
"beautiful-sort" | ||
], | ||
"rules": { | ||
"beautiful-sort/import": [2, { | ||
"special": ["react"], | ||
"order": ["special", "default", "defaultObj", "obj", "none"] | ||
}] | ||
} | ||
} | ||
``` |
8037
39