tn-prettier-imports weekly downloads statistics
By JawadAhbab · npm · Prettier plugins
Prettier plugin that keeps import and export statements on a single line.
tn-prettier-imports has 3 recorded weekly downloads on npm, a decrease of 62.5% over the past 30 days.
About tn-prettier-imports
tn-prettier-imports
A Prettier v3 plugin that keeps import and export statements on a
single line, overriding Prettier's default of wrapping long specifier lists one-per-line.
// Prettier on its own // with tn-prettier-imports
import { import { one, two, three, four, five, six } from './module'
one,
two,
three,
four,
five,
six,
} from './module'
Install
npm install --save-dev tn-prettier-imports
# or: yarn add -D tn-prettier-imports
Requires prettier@^3.
Usage
Add it to the plugins array of your Prettier config:
// .prettierrc.js
module.exports = {
plugins: ['tn-prettier-imports'],
}
Works for JavaScript and TypeScript — .js, .jsx, .ts, .tsx (babel, babel-ts and
typescript parsers).
What it collapses
| Statement | Behavior |
|---|---|
import { ... } from '...' | → single line |
import Default, { ... } from '…' | → single line |
import type { ... } from '...' | → single line |
import * as ns from '...' | → single line |
export { ... } (local) | → single line |
export { ... } from '...' | → single line |
export type { ... } from '...' | → single line |
export * from '...' | → single line |
Everything else is formatted exactly as vanilla Prettier would — object literals,
export const/function/class declarations and export default are left untouched.
Comment safety
A statement that contains a line comment inside its braces is left in Prettier's
multi-line layout, because collapsing it would let the // swallow the rest of the line:
import {
one, // still here
two,
} from './module'
Block comments (/* ... */) collapse inline and are preserved.
How it works
The plugin wraps Prettier's built-in estree printer. For each import / export statement
it takes the Doc that the stock printer produced and rewrites it into its flat, single-line
form; every other node is returned unchanged. See CLAUDE.md for the architecture.
Development
yarn install
yarn test # node --test
License
MIT
Description from the npm listing.
- prettier
- prettier-plugin
- imports
- exports
- single-line
- formatting
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm Prettier plugins plugins
All 20 tn-prettier-imports alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/tn-prettier-imports. First seen Oct 16, 2026; last successful collection Oct 22, 2026. See the methodology.