Skip to content

Commit

Permalink
Adopt & enforce the mozilla-central Prettier config (mozilla#467)
Browse files Browse the repository at this point in the history
Taken from:
https://searchfox.org/mozilla-central/rev/49011d374b626d5f0e7dc751a8a57365878e65f1/.prettierrc

Explicitly include `arrowParens: avoid` to keep the Prettier v1 default.
  • Loading branch information
eemeli committed Nov 9, 2022
1 parent aa8555f commit 8f9aa45
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ jobs:
- uses: actions/setup-node@v3
- run: npm install --legacy-peer-deps
- run: npm run lint
- run: npx prettier --check .
- run: npm run coverage
- run: npx nyc report --reporter=text
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.nyc_output/
bench/
coverage/
node_modules/
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"arrowParens": "avoid",
"endOfLine": "lf",
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "es5"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"dev:watch": "watch 'npm run coverage' lib/ test/",
"predev": "npm run setup",
"dev": "npm-run-all -p --silent dev:*",
"prettier": "prettier --write *.* lib/ test/",
"prettier": "prettier --write .",
"clean": "rm -rf coverage .nyc_output",
"toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
},
Expand Down

0 comments on commit 8f9aa45

Please sign in to comment.