# import-sort-style-fengk

> An import-sort style for my own to sort React project modules

Latest version **1.1.0** (published 2018-02-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install import-sort-style-fengk
pnpm add import-sort-style-fengk
yarn add import-sort-style-fengk
bun add import-sort-style-fengk
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-02-07 |
| First published | 2018-02-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fengk |
| Maintainers | fengkun |
| Keywords | import-sort, style, react |

## Links

- npm: https://www.npmjs.com/package/import-sort-style-fengk
- Repository: https://github.com/fengkfengk/import-sort-react-first
- Homepage: https://github.com/fengkfengk/import-sort-react-first#readme
- Issues: https://github.com/fengkfengk/import-sort-react-first/issues
- npm.io page: https://npm.io/package/import-sort-style-fengk

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2018-02-07
- 1.0.0 — 2018-02-06

## README

# import-sort-style-fengk
## why to create this
* to verify my own code since no satisfied tools found in eslint plugins. (Maybe `eslint-plugin-import` is great, but couldn't auto fix)

## how it work
1. this is based on [import-sort](https://github.com/renke/import-sort). You may need to create a `.importsortrc` file in your working directory just like this:
```js
{
    ".js, .jsx": {
        "parser": "babylon",
        "style": "fengk"
    }
}
```
2. `npm i import-sort-style-fengk --save-dev` or just put this package into your `node_modules` instead of writing dependencies into your `package.json`

## result
```js
// Modules from the Node.js "standard" Library sorted by name
import { readFile, writeFile } from 'fs'
import path from 'path'

// Modules about React
import React from 'react'
import ReactDOM from 'react-dom'
import { Button } from 'antd'

// Absolute modules with side effects(not styled modules)
import 'a'
import 'b'

// Absolute modules from third-party modules
import aa from 'aa'
import bb from 'bb'

// Relative modules sorted by "relative depth" and then by name
import aaa from '././aaa'
import bbb from '././bbb'
import aaaa from './a'
import bbbb from './b'

// Absolute styled modules
import 'index.css'

// Firts-party styled modules
import styles from "./index.css"
```

## other
* Thanks for using or referencing. The best way to write your own style is to look at existing styles like this style or the [orgin author's style](https://github.com/renke/import-sort/blob/master/packages/import-sort-style-renke/src/index.ts)

---
_Source: https://npm.io/package/import-sort-style-fengk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
