mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 09:48:15 +08:00
.. | ||
package.json | ||
prettierrc.json | ||
README.md |
Flarum Prettier Config
Flarum's official configuration for the Prettier code formatter.
For more info about shared Prettier configurations, check out the Prettier documentation.
Usage
Add the prettier
key to your package.json
:
// package.json
{
"name": "my-cool-package",
"version": "1.0.0",
"prettier": "@flarum/prettier-config"
// ...
}
Extending
You can extend our config with your own custom options, too. Import our config, then spread its require in a .prettierrc.js
file:
// .prettierrc.js
module.exports = {
...require("@flarum/prettier-config"),
semi: false,
};