Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README to show more options for disabling and overrides (#165)
The new feature of disabling with empty array can do more than just disabling globally and enabling for certain folders or files. It can do the opposite: enabling globally and disabling for certain folders or files. It can also do sort order overrides, where a different order applies to certain folders and files instead of the global order. Feel free to suggest a rewrite of the text if needed. 🙂 I have used the reverse configuration in an actual project and it works well: ```jsonc // .prettierrc { "plugins": ["@ianvs/prettier-plugin-sort-imports"], "overrides": [ { "files": "please/doNot/sortThis.ts", "options": { "importOrder": [] // disabled } } ], "importOrder": [ /* global order here */ ] //... } ``` Tip: The `overrides` order can come before or after the global `importOrder`. It doesn't matter as Prettier will always apply the override regardless of where it is in `.prettierrc`.
- Loading branch information