Prettier
Remaining consistent isn't easy when the team grows. A lot of code formatting issues brought up by the linter can be fixed automatically. That's Prettier.
$ yarn add prettierChange index.ts to following code:
const printFizz = number => {
if (!Boolean(number % 3))
{
return "fizz";
}
};
then run
$ prettier --write packages/api/index.tsThe file has been formatted correctly:
const printFizz = number => {
if (!Boolean(number % 3)) {
return "fizz";
}
};Avoid TSLint conflict
Update tslint.json
Last updated
Was this helpful?