@swimlane/prettier-setup v0.1.0
prettier-setup
A CLI tool for adding Prettier to projects.
Installation
- Install globally via npm:
npm install -g @swimlane/prettier-setupUsage
In a terminal, navigate to a project's directory and run prettier-setup.
This will prompt the user for the name of a Prettier configuration package to use (such as @swimlane/prettier-config-swimlane) and a glob pattern of files to format with Prettier.
If no Prettier configuration package name is provided, the user will be guided through building one.
Note:
prettier-setupassumes apackage.jsonfile exists in the same directory it's invoked in.
Output
- Creates a Prettier configuration file named
prettier.config.jsor.prettierrc. - If a
.gitignorefile is found, creates a.prettierignorefile with the same contents as.gitignore. - If a
.eslintrcfile is found, addseslint-config-prettieras an extended configuration. - If a
tslint.jsonfile is found, addstslint-config-prettieras an extended configuration. - Adds script
prettiertopackage.json, which will format specified files when executed.
License
Credits
prettier-setup is a Swimlane open-source project; we
believe in giving back to the open-source community by sharing some of the
projects we build.
Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.
8 years ago