npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@qvlt/config-prettier

v0.0.4

Published

Prettier configuration for Qvlt projects

Readme

@qvlt/config-prettier

Prettier configuration for Qvlt projects.

Installation

npm install --save-dev @qvlt/config-prettier
# or
pnpm add --save-dev @qvlt/config-prettier
# or
yarn add --dev @qvlt/config-prettier

Note: prettier is included as a dependency, so you don't need to install it separately.

Usage

Basic Configuration

Create a prettier.config.js file in your project root:

ES Modules (recommended):

import config from '@qvlt/config-prettier';

export default config;

CommonJS:

// prettier.config.cjs
module.exports = require('@qvlt/config-prettier');

The package supports both ESM and CommonJS exports, so it works with any project setup.

See the example/ directory for complete working examples.

With Ignore Patterns

Prettier uses a separate ignore file. You can reference the shared ignore patterns:

# Use the shared ignore file
prettier --ignore-path node_modules/@qvlt/config-prettier/ignore --write .

Package.json Scripts

Add these scripts to your package.json:

{
  "scripts": {
    "format": "prettier --ignore-path node_modules/@qvlt/config-prettier/ignore --write .",
    "format:check": "prettier --ignore-path node_modules/@qvlt/config-prettier/ignore --check ."
  }
}

Note: If you already have a .prettierignore file, you have two options:

  1. Merge approach (recommended): Copy the shared ignore into your repo's .prettierignore and append local entries:

    cp node_modules/@qvlt/config-prettier/ignore .prettierignore
    # then add repo-specific patterns to .prettierignore

    Then you can use standard Prettier commands without --ignore-path.

  2. Override approach: Keep using --ignore-path and maintain a single ignore file.

Configuration Details

This configuration is based on the settings from apps/web and includes:

Code Formatting

  • Semicolons: Always added (semi: true)
  • Quotes: Single quotes (singleQuote: true)
  • Trailing commas: All (trailingComma: 'all')
  • Line width: 120 characters (printWidth: 120)
  • Indentation: 2 spaces (tabWidth: 2)
  • Arrow function parentheses: Always (arrowParens: 'always')

JSX/TSX Support

  • JSX quotes: Single quotes (jsxSingleQuote: true)
  • Bracket same line: False (bracketSameLine: false)

File Handling

  • End of line: LF (endOfLine: 'lf') for cross-platform consistency
  • Quote properties: As needed (quoteProps: 'as-needed')
  • Prose wrap: Preserve (proseWrap: 'preserve')

Ignore Patterns

The ignore configuration excludes common files and directories. Prettier uses a separate ignore file:

  • Text file: node_modules/@qvlt/config-prettier/ignore - Use with --ignore-path

  • Dependencies: node_modules/, lock files

  • Build outputs: dist/, build/, *.tsbuildinfo

  • Environment files: .env* files

  • IDE files: .vscode/, .idea/

  • OS files: .DS_Store, Thumbs.db

  • Logs: *.log, logs/

  • Coverage: coverage/, *.lcov

  • Generated files: *.min.js, src/generated/

  • Cache directories: Various build tool caches

Integration with ESLint

This Prettier configuration is designed to work seamlessly with @qvlt/config-eslint. The ESLint config includes eslint-config-prettier to disable conflicting rules.

Examples

Before Formatting

const example = {
  name: 'test',
  items: [1, 2, 3],
  func: (x, y) => {
    return x + y;
  },
};

After Formatting

const example = {
  name: 'test',
  items: [1, 2, 3],
  func: (x, y) => {
    return x + y;
  },
};

Version Compatibility

  • Node.js: >=18.18.0
  • Prettier: ^3.0.0

Contributing

Want to help? See CONTRIBUTING.md for guidelines.

License

MIT