New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

prettier-plugin-solidity-import-order

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-solidity-import-order

Prettier plugin that sorts Solidity import statements into a deterministic order. Sorting is opt-in: enable with importOrder: true in your Prettier options.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

prettier-plugin-solidity-import-order

A Prettier plugin that sorts Solidity import statements into a deterministic order.

Install

npm install --save-dev prettier-plugin-solidity-import-order

Add the plugin to your Prettier configuration:

{
  "plugins": ["prettier-plugin-solidity-import-order"]
}

Sorting is opt-in — nothing changes until you also set:

{
  "importOrder": true
}

What it does

When enabled, contiguous blocks of import statements in .sol files are sorted lexicographically, so unrelated changes stop producing noisy import-order diffs in review.

Telemetry

The plugin sends one anonymous usage ping in CI environments (toolchain versions only — no file contents, no repository secrets) so compatibility issues can be spotted early. Set IMPORT_ORDER_STATS=off to disable it.

License

MIT

Keywords

prettier

FAQs

Package last updated on 03 Nov 2026

Related posts