New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@einride/prettier-config

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@einride/prettier-config

Einride's default Prettier config

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@einride/prettier-config

license npm version total npm downloads

Einride's default Prettier config

Installation

Install @einride/prettier-config as a dev dependency:

yarn add @einride/prettier-config --dev

Make sure Prettier is also installed in your project.

Usage

Add @einride/prettier-config to your .prettierrc.js file:

module.exports = {
  ...require("@einride/prettier-config"),
}

Specific settings can be overridden by adding them after @einride/prettier-config:

module.exports = {
  ...require("@einride/prettier-config"),
  semi: true,
}

Add a formatting scripts to the scripts section of your package.json:

{
  "scripts": {
    "format": "prettier --write .",
    "format-check": "prettier --check ."
  }
}

Running yarn format will format all your files according to the config specified in .prettierrc.js.

Running yarn format-check will return exit code 1 when there are formatting issues, which makes it a good fit for CI.

Add a .prettierignore file to ignore files from being formatted:

src/gen # ignores files in src/gen directory from being formatted

node_modules is ignored by default.

Contribute

See Contributing Guide.

License

MIT

Keywords

FAQs

Package last updated on 08 Jul 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