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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sanjeever/prettier-config

v1.0.1

Published

My prettier config

Readme

@sanjeever/prettier-config

My personal Prettier config.

View on npmjs

Usage

Install:

yarn add --dev @sanjeever/prettier-config

Edit package.json:

{
  // ...
  "prettier": "@sanjeever/prettier-config"
}

or

Edit .prettierrc

"@sanjeever/prettier-config"

Intro

  • arrowParens: 箭头函数的参数是否带括号。可选值为 "avoid" 和 "always",这里是 "avoid",表示只有当参数超过一个时才带括号。
  • bracketSameLine: 是否在数组和对象字面量的括号前放置空格,这里是 true,表示放置空格。
  • bracketSpacing: 是否在对象字面量的括号中放置空格,这里是 true,表示放置空格。
  • embeddedLanguageFormatting: 控制内嵌语言的格式化方式。可选值为 "auto"、"off" 和 "on",这里是 "auto",表示自动格式化。
  • htmlWhitespaceSensitivity: 控制 HTML 文件中空格敏感度。可选值为 "css"、"strict" 和 "ignore",这里是 "ignore",表示忽略空格。
  • insertPragma: 是否在文件顶部插入一个特殊的注释以指示该文件使用了 Prettier 进行格式化,这里是 false,表示不插入。
  • jsxSingleQuote: 在 JSX 中是否使用单引号,这里是 true,表示使用单引号。
  • printWidth: 每行代码的最大宽度,这里是 80,表示超过 80 个字符就换行。
  • proseWrap: 控制是否换行。可选值为 "always"、"never" 和 "preserve",这里是 "preserve",表示按原样保留。
  • quoteProps: 对象属性是否使用引号。可选值为 "as-needed"、"consistent" 和 "preserve",这里是 "as-needed",表示只在必要时添加引号。
  • requirePragma: 是否要求文件顶部包含特殊的注释以指示该文件使用了 Prettier 进行格式化,这里是 false,表示不要求。
  • semi: 是否在语句末尾添加分号,这里是 false,表示不添加。
  • singleAttributePerLine: 是否将每个属性放在单独的行上,这里是 false,表示不单独放置。
  • singleQuote: 是否使用单引号,这里是 true,表示使用单引号。
  • tabWidth: 缩进使用的空格数,这里是 2,表示每个缩进使用两个空格。
  • trailingComma: 控制是否在对象和数组字面量的最后一个元素后添加尾逗号。可选值为 "es5"、"none" 和 "all",这里是 "es5",表示只在 ES5 中需要添加尾逗号。
  • useTabs: 是否使用 tab 缩进,这里是 false,表示不使用 tab 缩进。
  • vueIndentScriptAndStyle: 是否缩进 Vue 文件中的 script 和 style 标签,这里是 false,表示不缩进。
  • overrides: 覆盖特定文件类型的格式化设置。这里添加了扩展名为 ".wxml" 的文件,使用 HTML 解析器进行格式化。

Thanks

prettier/prettier: Prettier is an opinionated code formatter.