Socket
Socket
Sign inDemoInstall

@packlify/config-format

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@packlify/config-format

Shared Prettier configuration for Packlify


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

@packlify/config-format

Part of the Packlify Web SDK ecosystem, @packlify/config-format is a package that manages code formatting using Prettier and additional plugins. It comes with command line utilities to both check and write code formats.

Table of Contents

Installation

Install the package using npm or yarn:

npm install @packlify/config-format

Features

@packlify/config-format offers:

  • Command line utilities for format checking and writing.
  • Shared Prettier configuration to enforce consistent styling.
  • Support for sorting import statements using a Prettier plugin.
  • A vibrant and informative console output using chalk.

Dependencies

The package relies on the following key dependencies:

  • chalk: For colored console output.
  • prettier: For code formatting.
  • Additional Prettier plugins for specialized formatting.

Usage

TypeScript (ESM)

The package provides two CLI utilities: packlify-format-check and packlify-format-write.

packlify-format-check

The CLI utility checks for code formatting issues. It scans .js, .jsx, .ts, and .tsx files within the src folder:

npx packlify-format-check
packlify-format-write

This CLI utility writes the code formatting fixes to .js, .jsx, .ts, and .tsx files within the src folder:

npx packlify-format-write

Prettier Configuration

The package comes with a pre-configured Prettier setup, specified in prettier.config.cjs. The following rules are set by default:

  • trailingComma: 'es5'
  • printWidth: 120
  • arrowParens: 'avoid'
  • singleQuote: true

Additional rules related to import sorting are also configured.

const prettierConfig = require('@packlify/config-format/prettier.config.cjs');

module.exports = {
  ...config,
  // ...You can add here also your configurations
};

Contact

Lucas Farias lukf95@gmail.com LinkedIn - GitHub

FAQs

Package last updated on 24 Sep 2023

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