Socket
Socket
Sign inDemoInstall

@gideon/prettier-config

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @gideon/prettier-config

My preferred prettier config for javascript projects


Version published
Maintainers
1
Install size
1.63 kB
Created

Readme

Source

Gideon's prettier config

My personal prettier setup for javascript projects. Feel free to use it any way you like.

Installation

yarn add -D @gideon/prettier-config

Install required peerDependencies:

yarn add -D prettier

Import in package.json:

"prettier": "@gideon/prettier-config"

Add a format command to your package.json:

"format": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'",
"format:fix": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",

Enable format on save

Add the following to your .vscode/settings.json file:

"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,

Add/override rules

Instead of using package.json, you can also import this config in your .prettierrc.js file. Here you can add or override rules as follows:

module.exports = {
  ...require("@gideon/prettier-config"),
  semi: false,
};

FAQs

Last updated on 05 Mar 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc