Trust-Machines / Wallet

MIT License
2 stars 2 forks source link

Use Stacks ecosystem prettier config #1

Open kyranjamie opened 2 years ago

kyranjamie commented 2 years ago

It'd be great if code could follow consistent formatting with the rest of Stack ecosystem code.

The config is shared as a npm package here https://www.npmjs.com/package/@stacks/prettier-config

dakai-bot commented 2 years ago

The following commit message should fix this issue: https://github.com/Trust-Machines/Wallet/commit/92e50b196fa4cbefaafd900bb40eab6a3cd65e94

kyranjamie commented 2 years ago

I see that @stacks/prettier-config has been added as a package, but it hasn't been configured.

It can be set by adding this line to the package.json, otherwise editors don't know which config to use.

"prettier": "@stacks/prettier-config",

Further, it can be a devDependency, not a dependency.

We have this command ran as a github action to ensure that all code is formatted consistently

 "lint:prettier": "prettier --check \"{src,tests}/**/*.{ts,tsx}\" \"*.{js,json}\"",