Skip to content

Commit 89d513c

Browse files
committed
chore: add prettier
+ bump
1 parent 716f6eb commit 89d513c

File tree

4 files changed

+58
-15
lines changed

4 files changed

+58
-15
lines changed

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
package.json
3+
package-lock.json
4+
pnpm-lock.yaml
5+
coverage
6+
build
7+
prebuilds
8+
fuzzaldrin-dist.js
9+
fuzzaldrin-dist.js.map
10+
spec/*.coffee
11+
.parcel-cache

package-lock.json

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "fuzzaldrin-dist.js",
66
"types": "./types/fuzzaldrin-plus-fast.d.ts",
77
"scripts": {
8-
"format": "clang-format -i src/*.cc src/*.h",
8+
"format": "prettier --write . && clang-format -i src/*.cc src/*.h",
99
"tidy": "clang-tidy src/*.cc src/*.h",
1010
"tidy:fix": "clang-tidy src/*.cc src/*.h --fix --fix-errors",
1111
"native:clean": "shx rm -rf build prebuilds",
@@ -51,10 +51,11 @@
5151
"fuzzaldrin-plus": "^0.6.0",
5252
"growl": ">=1.10.5",
5353
"jasmine-node": "^3.0.0",
54-
"npm-check-updates": "9.2.4",
54+
"npm-check-updates": "10.0.0",
5555
"parcel": "^2.0.0-nightly.438",
5656
"prebuildify": "^4.1.0",
57-
"shx": "^0.3.3"
57+
"shx": "^0.3.3",
58+
"prettier": "^2.1.2"
5859
},
5960
"repository": {
6061
"type": "git",

prettier.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Add to .prettierignore to ignore files and folders
2+
3+
// This configuration all the formats including typescript, javascript, json, yaml, markdown
4+
module.exports = {
5+
tabWidth: 2,
6+
printWidth: 120,
7+
semi: false,
8+
singleQuote: false,
9+
overrides: [
10+
{
11+
files: "{*.json}",
12+
options: {
13+
parser: "json",
14+
trailingComma: "es5",
15+
},
16+
},
17+
{
18+
files: "{*.md}",
19+
options: {
20+
parser: "markdown",
21+
proseWrap: "preserve",
22+
},
23+
},
24+
],
25+
}

0 commit comments

Comments
 (0)