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

@springernature/prettier-config

v0.1.0

Published

Springernature shareable config for Prettier

Readme

Springer Nature Prettier Configuration

MIT licensed

Shareable Prettier config used at Springer Nature for enforcing consistent code style across many file formats, including JavaScript, HTML, CSS, and Markdown.

Prettier is an opinionated code formatter, and much of it's formatting is not configurable. This package provides configuration rules used by Springer Nature, for the options that can be set.

[!IMPORTANT]
Prettier is intended to be used with the following versions of our other linters found in this repository:
@springernature/[email protected] and above
@springernature/[email protected] and above

Requirements

This package requires:

Installation

Our default export contains all of our Prettier rules.

prettier is defined in peerDependencies, which means that you will need to add these to your own project's devDependencies.

Install prettier and our config to your devDependencies

npm install -D [email protected] @springernature/prettier-config

You then need to setup the configuration so it can be used in your project. This can be done in 3 different ways:

  1. Add an entry into your package.json file. "prettier": "@springernature/prettier-config"

  2. Create a prettier.config.js file in the root of your project, and add either of the following lines to it:

'@springernature/prettier-config'; 

or

export { default } from '@springernature/prettier-config';

Both of these tell Prettier that you just want to use the Springer Nature config, without specifying overrides. The format you choose is up to you, whichever you feel makes the code clearer.

  1. This final option allows you to override the Springer Nature config. Create a prettier.config.js file in the root of your project, and add the following to it:
import springerNatureConfig from '@springernature/prettier-config';

export default {
	...springerNatureConfig,
	singleQuote: false // example override
};

Usage

There are several ways that Prettier can be used, however, it is recommended to run it from within your code editor.

Visual code, for example, has a prettier-vscode plugin. This allows you to format an individual file or selection using the Command Palette, or formatting a file on save.

If you don't already use prettier, it is likely that you will want to run it against your whole project, and then use the editor to maintain it's usage as you make code changes.

To do this, you can run:

npx prettier . --write

This will format all matching files according to the Prettier configuration. This could result in a large number of stylistic changes to the code, mostly from changing quote style, adding spaces around braces, etc. If you want to start using Prettier more incrementally, you can instruct it to ignore code.

Ignore code

Often you will want to ignore certain files or folders from being formatted. For example, compiled code or test coverage folders. You can do this by creating a .prettierignore file in the root of your project.

# Ignore artifacts:
*.html
*.css
*.scss
*.md
coverage
target

Contributing

This package is used by many active Springer Nature projects. We always welcome issues and pull requests, but we may not always be able to merge your suggestions.

If we decide that we can't merge your PR or act on your issue, it's nothing personal! We love to see new contributors, and we strive to provide a welcoming and inclusive environment.

License

The prettier-config-springernature repository is licensed under the MIT License.
All packages within this repository are licensed under the MIT License.
Copyright © 2025, Springer Nature