JSPM

prettier-basic

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 290
  • Score
    100M100P100Q79730F
  • License MIT

A simple prettier configuration for formatting code

Package Exports

  • prettier-basic
  • prettier-basic/.prettierrc.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prettier-basic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Prettier Basic

This is a simple prettier configuration that helps match the best coding standards. And by the best coding standards, I of course mean my own. I am open to suggestions and pull requests. This standard is mostly based on airbnb's standard, but with some modifications. To install

npm install --save-dev prettier prettier-basic
# or
yarn add --dev prettier prettier-basic

Then add the following to your package.json

{
  "prettier": "prettier-basic"
}

Or for your .prettierrc file

"prettier-basic"

Or to extend and change to inferior standards, you can put this in your .prettierrc.js file

module.exports = {
  ...require("prettier-basic"),
  semi: false,
};

Optional Configuration

I like to add an auto format script to my package.json as well

{
  "scripts": {
    "format": "prettier --write \"**/*.{js,jsx,ts,tsx,css,scss,md}\""
  }
}

then it can be run with npm run format or yarn format

Info

Refer to the prettier options for more information on the options.

Refer to the prettier configuration for more information on configuration.