🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@clabnet/configs-prettier

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clabnet/configs-prettier

Shared prettier config for monorepo and lib packages

latest
Source
npmnpm
Version
0.1.18
Version published
Maintainers
1
Created
Source

Shared prettier configuration

License: MIT

The purpose of the prettier is formatting many language formats (js, ts, tsx, md, json, yaml).

Contents

Setup

  • Add workspace reference to @clabnet/configs-prettier and its peer dependencies:

    pnpm add -w @clabnet/configs-prettier prettier
    
  • Add prettier configuration file:

    // .prettierrc.js
    
    module.exports = require('@clabnet/configs-prettier')
    
  • Add prettier ignore patterns file:

    # .prettierignore
    
    node_modules/
    pnpm-lock.yaml
    
    # Next ignore patterns
    .next/
    .build/
    .coverage/
    
    # Custom ignore patterns
    ...
    
  • Add prettier scripts:

    // package.json
    
    "scripts": {
      ...
      "format": "prettier",
      "format:check": "pnpm format --check --debug-check",
      "format:fix": "pnpm format --write"
      ...
    }
    

Automation

Usage

  • Automatic format file with prettier on save.

  • Automatic format of staged files with prettier on commit.

  • Manual usage from command line:

    pnpm format:check .
    pnpm format:fix .
    

⬅ Back

Keywords

configs

FAQs

Package last updated on 06 May 2025

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