Skip to content

⚙️ Prettier sharelable configuration for Brixtol Textiles

License

Notifications You must be signed in to change notification settings

BRIXTOL/prettier-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@brixtol/prettier-config

This package includes the shareable Prettier configuration consumed by Brixtol Textiles.

Install

pnpm

pnpm add prettier @brixtol/prettier-config --save-dev

Prettier is an optionalDependency so you will need to install it within your project.

Usage

We extend configuration from within package.json files.

{
  "prettier": "@brixtol/prettier-config"
}

Text Editor (VSCode)

Install the esbenp.prettier-vscode extension from the marketplace. Depending on how your editor is configured, one may require setting global configuration in a user settings.json file:

{
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[markdown]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode" // disabled in brixtol packages
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode" // disabled in brixtol packages
  }
}
Pnpm monorepo

If you are working within a pnpm monorepo workspace there are 2 ways you can leverage prettier. For us here at brixtol we provide prettier and the shareable config in the root as developement dependency. You may wish to refer a certain workspace (package) to the shareable config within .vscode/settings.json file:

{
  "prettier.configPath": "node_modules/@brixtol/prettier-config/index.js"
}

Ignored Files

We do not leverage prettier for various file types because it is extremely opionated and conflicts with our code styles, especially that found in JavaScript and TypeScript based projects. In almost all packages within our monorepo a .prettierignore file is included to prevent prettier from wreaking utter havoc in our development workspace. Below is standard ignores we assert:

*.toml
*.mjs
*.js
*.ts
*.css
*.scss
*.liquid
*.html

Related

License

MIT


We open source!

About

⚙️ Prettier sharelable configuration for Brixtol Textiles

Topics

Resources

License

Stars

Watchers

Forks