Shared Prettier configuration for MapColonies projects. This package provides a consistent code formatting style across our repositories.
This configuration extends Prettier's default settings with MapColonies' preferred styling choices:
- Single quotes
- 2 spaces indentation
- 150 characters line length
- ES5 trailing commas
- LF line endings
- Semicolons enforced
npm install --save-dev @mapcolonies/prettier-configAdd the configuration using one of these methods:
- Add to your
package.json:
{
"prettier": "@map-colonies/prettier-config"
}- Create a
.prettierrcJSON file:
"@map-colonies/prettier-config"- If you need to customize some options, create a
.prettierrc.jsfile:
module.exports = {
...require("@map-colonies/prettier-config"),
// your overrides here
};