-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable custom order in the same group #170
Comments
This feature exists in a fork, if you want to use that until/unless this project merges #42. https://github.com/ianvs/prettier-plugin-sort-imports#importorderseparation |
Could this help? const packages = require('./package.json').dependencies;
const sortedPackages = Object.keys(packages).sort();
module.exports = {
printWidth: 120,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
endOfLine: 'lf',
importOrder: sortedPackages.concat(['<THIRD_PARTY_MODULES>', '^\\.\\./', '^\\./']),
importOrderSeparation: true,
importOrderSortSpecifiers: true,
importOrderCaseInsensitive: true,
}; Actually |
@tearf001 I don't think it would. Anyway I'm using this fork at the moment that can do it: https://github.com/ianvs/prettier-plugin-sort-imports |
@tearf001 const sortedPackages = Object.keys(packages).sort().map(package => `^${package}($|\/.+)`; |
I really would like this feature! |
I would LOVE this feature! Has any progress been made? |
I would LOVE this feature. I like React imports up top also. |
Is your feature request related to a problem?
I would like to manually sort some imports in a group without placing them in separated group.
For instance I'd like to have
import React from "react"
as first and then all the others in alphabetical orders as default.Describe the solution you'd like
I thought we could set an array for a single group to define an order. Example:
Describe alternatives you've considered
None
The text was updated successfully, but these errors were encountered: