Specification for the package Prettier used in Stark
Stark allows you to prettify your code with Prettier
.
You can do it whenever you want with the script prettier-check
$ npm run prettier-check
The main Prettier configuration file is located in stark-build
.
The ones located in starter
, showcase
and the other one located in the root just reference the stark-build
configuration file
The configurations of TSLint
and Stylelint
can conflict with Prettier
.
It's why we use tslint-config-prettier and
stylelint-config-prettier
To check if your configuration of TSLint
conflicts with Prettier
, you can run the script tslint-check
:
$ npm run tslint-check
To check if your configuration of Stylelint
conflicts with Prettier
, you can run the script stylelint-check
:
$ npm run stylelint-check
By default, Stark tslint configuration extends tslint-config-prettier to avoid conflicts and stylelint configuration extends stylelint-config-prettier for the same reason
.prettierignore
file contains all the files which won't be prettified by Prettier
Before every commit, Prettier
will prettify all the modified code.
This is done by using Husky
and Lint-staged to execute Prettier
for every changed files before every commit so you won't need to execute it manually
before you commit your code