Socket
Socket
Sign inDemoInstall

@cbschuld/prettier-config

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cbschuld/prettier-config

My personal prettier config - format influenced by standardjs.com


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@cbschuld/prettier-config

My personal prettier config - format influenced by standardjs.com

Installation

npm install --save-dev @cbschuld/prettier-config

Next, make sure you edit your package.json file by adding the reference for prettier:

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

Notes on VSCODE

To really enable VS CODE to work well with this configuration make sure you install both Prettier and ESLint.

Next, create a settings.json file in the .vscode root path of your project as follows. (Please note: this example contains additional settings I personally enjoy - you can ignore those)

{
  "editor.formatOnSave": true, // Tell VSCode to format files on save
  "editor.defaultFormatter": "esbenp.prettier-vscode", // Tell VSCode to use Prettier as default file formatter
  "editor.formatOnPaste": false,
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "files.exclude": {
    "node_modules/": true,
    "*/node_modules/": true,
    "**/node_modules/": true,
    "*/.serverless/": true,
    "**/.serverless/": true,
    "*/.webpack/": true,
    "**/.webpack/": true
  },
  "prettier.printWidth": 100,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": ["react", "html", "javascript", "typescript"]
}

FAQs

Last updated on 10 Sep 2021

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