Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Borys91 authored Feb 1, 2024
1 parent fec9a33 commit 95ac24e
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1 @@
Installation
Install as a dev dependency (along with prettier) via npm:


npm install --save-dev @swimlane/prettier-config-swimlane prettier@latest @trivago/prettier-plugin-sort-imports@latest

Usage
Create a file named prettier.config.js with the following contents:


'use strict';module.exports = require('@dangl/prettier-config-dangl');

Add a prettier script to package.json:


{
"scripts": {
"prettier": "prettier --write \"**/*.js\""
}
}

Adjust the glob pattern as needed to include more file extensions. For example, \"**/*.{js,ts}\" will format both JavaScript and TypeScript files and etc. Files can be excluded with a .prettierignore file.
Executing npm run prettier will now format a project's files.

0 comments on commit 95ac24e

Please sign in to comment.