Skip to content
This repository was archived by the owner on May 3, 2022. It is now read-only.

Commit c715044

Browse files
Merge pull request #20 from actions/prettier
prettier rules
2 parents 60c8242 + 7295685 commit c715044

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

.github/workflows/test.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@ jobs:
4040
- name: npm test
4141
run: npm test
4242

43+
# - name: Format
44+
# run: npm run format-check
45+
4346
- name: audit security
44-
run: npm audit
47+
run: npm audit --audit-level=moderate

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
_out

.prettierrc.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "none",
8+
"bracketSpacing": false,
9+
"arrowParens": "avoid",
10+
"parser": "typescript"
11+
}

package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"main": "index.js",
66
"scripts": {
77
"build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out",
8-
"test": "jest"
8+
"test": "jest",
9+
"format": "prettier --write packages/**/*.ts",
10+
"format-check": "prettier --check packages/**/*.ts",
11+
"audit-check": "npm audit --audit-level=moderate"
912
},
1013
"repository": {
1114
"type": "git",
@@ -25,6 +28,7 @@
2528
"@types/jest": "^25.1.4",
2629
"@types/node": "^12.12.31",
2730
"jest": "^25.1.0",
31+
"prettier": "^2.0.4",
2832
"proxy": "^1.0.1",
2933
"ts-jest": "^25.2.1",
3034
"typescript": "^3.8.3"

0 commit comments

Comments
 (0)