prettierignore-monorepo
v1.0.5
Published
Generate a single .prettierignore from multiple .gitignore and .prettierignore files in a monorepo
Readme
.prettierignore for monorepos
Workaround for Prettier's inability to use nested ignore-files.
Provides prettierignore-monorepo bin that:
- Collects all
.gitignoreand.prettierignorefiles in the monorepo - Glues them into a single root
.prettierignore - Appends rules from the root
.prettierignore-append(optional)
Usage
- Install as a dev dependency in the monorepo root
- If
.prettierignoreexists in the root, rename it to.prettierignore-append(andgit rm --cached .prettierignore) - Add
/.prettierignoreto root.gitignore - Run
prettierignore-monorepobin to generate initial.prettierignore - Set up the
prettierignore-monorepobin to run on some event (e.g. on a git hook, or in thepostinstallscript of the rootpackage.json)
