In this repo you'll find various code convention guideline files (and some .ignore stuff). Most of my projects will use at least one of these but I strive to use as many as I can.
note these are by no means definitive. Every project has different needs, treat these files as a starting point.
.
├── prettier // prettier config
│ ├── index.js
│ └── package.json
├── .dockerignore // things to ignore when building dockers
├── .editorconfig // default editor configuration
├── .eslintignore // files to ignore when using eslint
├── .eslintrc // default eslint config
├── .gitignore // files to ignore when working with git
├── LICENSE
└── README.md
My preferred prettier configuration.
Simply install the package with npm:
npm install --save-dev @mastermindzh/prettier-config
Configuring your project to use @mastermindzh/prettier-config
can be done in several ways.
The easiest is the package.json solution, the most extensible is the .prettierrc.js version.
Simply add a "prettier" key with the package name:
{
"prettier": "@mastermindzh/prettier-config"
}
This solution requires you to put a .prettierrc.js
file at the root of your project with the following code:
module.exports = {
...require("@mastermindzh/prettier-config"),
// optional overrides:
jsxBracketSameLine: true,
};