From 71d14f19d2c4d68b1668da3aefa39a33b5c48324 Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Fri, 10 Apr 2020 09:17:13 -0400 Subject: [PATCH 1/3] prettier rules --- .github/workflows/test.yml | 5 ++++- package-lock.json | 6 ++++++ package.json | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e716834..6b30013 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,5 +40,8 @@ jobs: - name: npm test run: npm test + - name: Format + run: npm run format-check + - name: audit security - run: npm audit + run: npm audit --audit-level=moderate diff --git a/package-lock.json b/package-lock.json index 0369352..25a3f03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3413,6 +3413,12 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prettier": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", + "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", + "dev": true + }, "pretty-format": { "version": "25.1.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.1.0.tgz", diff --git a/package.json b/package.json index 3fce213..e873fd2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,10 @@ "main": "index.js", "scripts": { "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", - "test": "jest" + "test": "jest", + "format": "prettier --write packages/**/*.ts", + "format-check": "prettier --check packages/**/*.ts", + "audit-check": "npm audit --audit-level=moderate" }, "repository": { "type": "git", @@ -25,6 +28,7 @@ "@types/jest": "^25.1.4", "@types/node": "^12.12.31", "jest": "^25.1.0", + "prettier": "^2.0.4", "proxy": "^1.0.1", "ts-jest": "^25.2.1", "typescript": "^3.8.3" From 20b83b585c1af0555ca3847420b7ee6c63ce2d7d Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Fri, 10 Apr 2020 09:21:58 -0400 Subject: [PATCH 2/3] prettier files --- .prettierignore | 2 ++ .prettierrc.json | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 .prettierignore create mode 100644 .prettierrc.json diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5633abf --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +node_modules/ +_out \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..386485a --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,11 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": false, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": false, + "arrowParens": "avoid", + "parser": "typescript" +} \ No newline at end of file From 7295685073e6780eb3f676ac376a8d5fa5227912 Mon Sep 17 00:00:00 2001 From: Bryan MacFarlane Date: Fri, 10 Apr 2020 09:24:24 -0400 Subject: [PATCH 3/3] comment format for review --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b30013..934d222 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,8 +40,8 @@ jobs: - name: npm test run: npm test - - name: Format - run: npm run format-check + # - name: Format + # run: npm run format-check - name: audit security run: npm audit --audit-level=moderate