Universal and common prettier configuration for your frontend projects.
pnpm add @lexmin0412/prettier-config-standard -D
Add .prettierrc.js
in you project's root directory:
module.exports = {
...require('@lexmin0412/prettier-config-standard'),
}
module.exports = {
...require('@lexmin0412/prettier-config-standard'),
semi: true
}
set semi
to true
after require @lexmin0412/prettier-config-standard
will override standard configurations.
there are some configuration items defined:
{
"printWidth": 100,
"useTabs": true,
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"proseWrap": "never",
"htmlWhitespaceSensitivity": "css",
"vueIndentScriptAndStyle": false,
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto",
"singleAttributePerLine": true
}
Click Here to get more details about Prettier.