Skip to content

Instantly share code, notes, and snippets.

@CodeByKwakes
Last active October 9, 2023 00:11
Show Gist options
  • Save CodeByKwakes/78fb5e6677c0000487e6412949fb4efe to your computer and use it in GitHub Desktop.
Save CodeByKwakes/78fb5e6677c0000487e6412949fb4efe to your computer and use it in GitHub Desktop.
Prettier Settings #prettier
{
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "none",
"bracketSameLine": true,
"singleAttributePerLine": true,
"overrides": [
{
"files": "*.component.html",
"options": {
"parser": "angular",
"plugins": [
"prettier-plugin-organize-attributes"
],
"attributeGroups": [
"$ANGULAR_STRUCTURAL_DIRECTIVE",
"$ANGULAR_ANIMATION",
"$ANGULAR_ANIMATION_INPUT",
"$ANGULAR_ELEMENT_REF",
"$CODE_GUIDE",
"$ANGULAR_INPUT",
"$ANGULAR_TWO_WAY_BINDING",
"$ANGULAR_OUTPUT"
]
}
},
{
"files": "*.html",
"options": {
"parser": "html"
}
}
]
}

Organize your HTML attributes automatically with Prettier 🧼

npm i prettier prettier-plugin-organize-attributes -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment