https://github.com/stormwarning/import-sort-style-python
Group and sort imports by module, à la Python isort
https://github.com/stormwarning/import-sort-style-python
import-sort-style isort
Last synced: 3 months ago
JSON representation
Group and sort imports by module, à la Python isort
- Host: GitHub
- URL: https://github.com/stormwarning/import-sort-style-python
- Owner: stormwarning
- License: isc
- Created: 2018-09-20T04:03:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-03T19:32:43.000Z (almost 5 years ago)
- Last Synced: 2025-10-23T17:47:13.508Z (7 months ago)
- Topics: import-sort-style, isort
- Language: TypeScript
- Size: 2.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# import-sort-style-python
[![npm version][npm-img]][npm-url]
[![npm downloads][npm-dls]][npm-url]
A style for [import-sort][] that groups and sorts imports by module, inspired by
[isort][]’s grouping style:
1. Node standard modules
2. Framework modules
3. Third-party modules
4. First-party modules
5. Explicitly local modules
Framework and First-party require setting some options in your config:
```json
"importSort": {
".js": {
"parser": "babylon",
"style": "python",
"options": {
"knownFramework": [
"@ember",
"@glimmer"
],
"knownFirstparty": [
"my-project"
]
}
},
}
```
[npm-url]: https://www.npmjs.com/package/import-sort-style-python
[npm-img]: https://img.shields.io/npm/v/import-sort-style-python.svg?style=flat-square
[npm-dls]: https://img.shields.io/npm/dt/import-sort-style-python.svg?style=flat-square
[import-sort]: https://github.com/renke/import-sort
[isort]: https://timothycrosley.github.io/isort/#how-does-isort-work