Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trivago/prettier-plugin-sort-imports

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trivago/prettier-plugin-sort-imports

A prettier plugins to sort imports in provided RegEx order

  • 5.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
decreased by-0.28%
Maintainers
0
Weekly downloads
 
Created

What is @trivago/prettier-plugin-sort-imports?

@trivago/prettier-plugin-sort-imports is a Prettier plugin that automatically sorts your import statements in a consistent and customizable manner. It helps maintain a clean and organized codebase by ensuring that import statements are ordered according to specified rules.

What are @trivago/prettier-plugin-sort-imports's main functionalities?

Sort imports alphabetically

This feature sorts the import statements alphabetically by module name.

import React from 'react';
import { useState } from 'react';
import { render } from 'react-dom';

Group imports by type

This feature groups import statements by their type, such as external libraries, internal modules, and styles.

import React from 'react';
import { useState } from 'react';
import { render } from 'react-dom';
import './styles.css';
import utils from './utils';

Customizable sorting order

This feature allows you to define a custom sorting order for your import statements, such as placing React imports at the top, followed by other external libraries, and then internal modules.

import React from 'react';
import { useState } from 'react';
import { render } from 'react-dom';
import utils from './utils';
import './styles.css';

Other packages similar to @trivago/prettier-plugin-sort-imports

Keywords

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc