A CLI tool for adding Prettier to projects.
- Install globally via npm:
npm install -g @swimlane/prettier-setup
In a terminal, navigate to a project's directory and run
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.
package.jsonfile exists in the same directory it's invoked in.
- Creates a Prettier configuration file named
- If a
.gitignorefile is found, creates a
.prettierignorefile with the same contents as
- If a
.eslintrcfile is found, adds
eslint-config-prettieras an extended configuration.
- If a
tslint.jsonfile is found, adds
tslint-config-prettieras an extended configuration.
- Adds script
package.json, which will format specified files when executed.
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.