Closed danjor closed 2 years ago
For the whole file or for a section / single tag? There's also always the option if just disabling the sorting for specific files inside the .prettierrc.
If you're interested in that I can give you an example.
Thanks for your reply.
We finally manage to ignore some files completly by using the .prettierignore and .prettierrc
If you only want to disable sorting for a specific file (or file-matcher) you can do it in the following way:
{
"overrides": [
{
"files": "unsorted.html",
"options": {
"attributeGroups": ["$DEFAULT"],
}
}
]
}
I'll mark this as resolved for now, if there are any other questions just comment here or in a new issue :)
Hello,
Could it be possible to add a feature to ignore a file so imports will not be ordered ? For instance, in my project we used previously "prettier-plugin-organize-imports", and they added a feature later to ignore a file from being formatted by the plugin, by adding the following comment :
// organize-imports-ignore
Full explaination could be found here, and related commit also here, that consists only of having an if condition to check if the file constains that comment.
Thank you.