A shared prettier config for shopware projects.
With npm:
npm i -D @shopware-ag/meteor-prettier-config
With pnpm:
pnpm i -D @shopware-ag/meteor-prettier-config
There are two ways to use this new config:
- By configuring prettier inside your
package.json
file:
{
"name": "my-package",
"devDependencies": {
"prettier": "^3.0.0",
},
// ↓ This is the important part ↓
"prettier": "@shopware-ag/meteor-prettier-config",
}
- Or you can use a
.prettierrc.js
file:
import meteorPrettierConfig from "@shopware-ag/meteor-prettier-config";
export default meteorPrettierConfig;
For a full guide you can read the prettier configuration.
We strongly advise to keep the configuration as is. The pre-defined config, aswell as prettier exist to avoid unnecessary discussions about things that do not matter.
However, if you really dislike using double quotes, you can override that setting like so:
// filename: .prettierrc.js
import meteorPrettierConfig from "@shopware-ag/meteor-prettier-config";
export default {
...meteorPrettierConfig,
singleQuote: true,
};