Skip to content

Commit 1faf95d

Browse files
author
Sergei Orlov
committed
🎨 Add Prettier configuration
Format code
1 parent 2c29a23 commit 1faf95d

File tree

7 files changed

+3432
-73
lines changed

7 files changed

+3432
-73
lines changed

.github/issue_template/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: '[BUG] '
4+
title: "[BUG] "
55
labels: bug
66
assignees: orlovedev
77
---

.github/issue_template/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: '[ENHANCEMENT] '
4+
title: "[ENHANCEMENT] "
55
labels: enhancement
66
assignees: orlovedev
77
---

notion.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

package.json

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
"registry": "https://registry-url"
88
},
99
"scripts": {
10-
"test": "echo \"Error: no test specified\" && exit 1",
10+
"test": "ava",
11+
"test:cover": "nyc ava",
12+
"format": "prettier --write *.{js,json,md} **/*.{js,json,md} **/**/*.{js,json,md}",
13+
"lint": "prettier -c *.{js,json,md} **/*.{js,json,md} **/**/*.{js,json,md}",
14+
"commit": "gitmoji --commit",
1115
"build": "echo \"No build script setup\""
1216
},
1317
"keywords": [
@@ -19,5 +23,57 @@
1923
"license": "0BSD",
2024
"dependencies": {
2125
"node-fetch": "^2.6.1"
26+
},
27+
"devDependencies": {
28+
"ava": "^3.15.0",
29+
"gitmoji-cli": "^4.1.0",
30+
"husky": "^6.0.0",
31+
"nyc": "^15.1.0",
32+
"prettier": "^2.3.0",
33+
"sinon": "^10.0.0",
34+
"yarn": "^1.22.10"
35+
},
36+
"husky": {
37+
"hooks": {
38+
"pre-push": "yarn lint"
39+
}
40+
},
41+
"prettier": {
42+
"printWidth": 100,
43+
"trailingComma": "all",
44+
"singleQuote": false,
45+
"semi": false,
46+
"useTabs": true,
47+
"tabWidth": 1,
48+
"bracketSpacing": true
49+
},
50+
"ava": {
51+
"files": [
52+
"test/**/*"
53+
],
54+
"extensions": [
55+
"js"
56+
],
57+
"concurrency": 5,
58+
"failFast": true,
59+
"failWithoutAssertions": false,
60+
"verbose": true,
61+
"nodeArguments": [
62+
"--trace-deprecation",
63+
"--napi-modules"
64+
]
65+
},
66+
"nyc": {
67+
"reporter": [
68+
"text",
69+
"lcov",
70+
"html"
71+
],
72+
"branches": 80,
73+
"lines": 80,
74+
"functions": 80,
75+
"statements": 80,
76+
"check-coverage": true,
77+
"all": true
2278
}
2379
}

src/notion-api/get-blocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports.getBlocks = async ({ page, notionVersion, token }, reporter) => {
1818
headers: {
1919
"Content-Type": "application/json",
2020
"Notion-Version": notionVersion,
21-
"Authorization": `Bearer ${token}`,
21+
Authorization: `Bearer ${token}`,
2222
},
2323
})
2424
.then((res) => res.json())

src/notion-api/get-pages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports.getPages = async ({ token, databaseId, notionVersion = "2021-05-13" }, r
1212
headers: {
1313
"Content-Type": "application/json",
1414
"Notion-Version": notionVersion,
15-
"Authorization": `Bearer ${token}`,
15+
Authorization: `Bearer ${token}`,
1616
},
1717
}).then((res) => res.json())
1818

0 commit comments

Comments
 (0)