New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

import-sort-style-pietile

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-sort-style-pietile

Simple and meaningful imports order

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6K
increased by9.71%
Maintainers
1
Weekly downloads
 
Created
Source

import-sort-style-pietile

Simple and meaningful imports order style for import-sort. Works great with JavaScript and TypeScript.

Usage

  1. Install packages:

    • import-sort: yarn add --dev import-sort
    • parser either JavaScript or _TypeScript: yarn add --dev import-sort-parser-babylon or yarn add --dev import-sort-parser-typescript
    • this style: yarn add --dev import-sort-style-pietile
  2. Setup config:

    {
      ".js, .jsx": {
        "parser": "babylon",
        "style": "pietile"
      },
      ".ts, .tsx": {
        "parser": "typescript",
        "style": "pietile"
      }
    }
    
  3. Sort imports either from CLI or with Editor plugin (VSCode for example)

Result

// Modules without members. Don't sort them as the order can be important.
import 'babel-polyfill';

// React module is special due to JSX requirement
import React from 'react';

// Modules from Node.js library
import { readFile, writeFile } from 'fs';
import * as path from 'path';

// Installed modules
import moment from 'moment';

// Project modules external to the current file
import Controller from '../../lib/Controller';
import RedButton from '../Buttons/RedButton';

// Project modules internal to the current file
import AwesomeComponent from './AwesomeComponent';

// Resources
import icon from './icon.png';

Why is this name?

https://mrsharpoblunto.github.io/foswig.js/

Keywords

FAQs

Package last updated on 04 Feb 2020

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