Go to file
2022-06-24 14:28:42 +02:00
prettier added some defaults :) 2020-06-16 21:46:58 +02:00
.dockerignore added some defaults :) 2020-06-16 21:46:58 +02:00
.editorconfig added some defaults :) 2020-06-16 21:46:58 +02:00
.eslintignore added some defaults :) 2020-06-16 21:46:58 +02:00
.eslintrc Update .eslintrc 2022-06-24 14:28:42 +02:00
.gitignore added some defaults :) 2020-06-16 21:46:58 +02:00
.stylelintrc added stylelint 2021-02-05 09:41:58 +01:00
LICENSE Initial commit 2019-06-16 10:08:12 +02:00
README.md added some defaults :) 2020-06-16 21:46:58 +02:00

mastermindzh' code conventions

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.

repo outline

.
├── 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

@mastermindzh/prettier-config

My preferred prettier configuration.

Installation

Simply install the package with npm:

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

Configuration

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.

package.json

Simply add a "prettier" key with the package name:

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

.prettierrc.js

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,
};