Merge pull request #26 from actions/prettier

5d6e537 · Jonathan Clem · 2020-05-14 20:35

9 files +59 -11
Message
{commit_body(@commit)}

Files changed

modified .gitattributes
+1 −0
@@ -1 +1,2 @@
1 1 node_modules/** -diff linguist-generated=true
2 +.licenses/** -diff linguist-generated=true
modified .github/workflows/licensed.yml
+10 −3
@@ -10,10 +10,17 @@ jobs:
10 10 runs-on: ubuntu-latest
11 11 name: Check licenses
12 12 steps:
13 - uses: actions/checkout@v1.0.0
14 - run: |-
13 + - uses: actions/checkout@v2
14 + - uses: actions/cache@v1
15 + with:
16 + path: ~/.npm
17 + key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
18 + restore-keys: ${{runner.os}}-npm-
19 + - run: npm ci
20 + - name: Install licensed
21 + run: |-
15 22 cd /tmp
16 curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.3.2/licensed-2.3.2-linux-x64.tar.gz
23 + curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.9.2/licensed-2.9.2-linux-x64.tar.gz
17 24 sudo tar -xzf licensed.tar.gz
18 25 sudo mv licensed /usr/local/bin/licensed
19 26 - run: licensed status
modified .github/workflows/test.yml
+1 −1
@@ -22,7 +22,7 @@ jobs:
22 22 - otp-version: 22.0
23 23 elixir-version: master
24 24 steps:
25 - uses: actions/checkout@v1.0.0
25 + - uses: actions/checkout@v2
26 26 - name: Use actions/setup-elixir
27 27 uses: ./
28 28 with:
added .licenses/npm/prettier.dep.yml
+18 −0
@@ -0,0 +1,18 @@
1 +---
2 +name: prettier
3 +version: 2.0.5
4 +type: npm
5 +summary: Prettier is an opinionated code formatter
6 +homepage: https://prettier.io
7 +license: mit
8 +licenses:
9 +- sources: LICENSE
10 + text: |
11 + Copyright © James Long and contributors
12 +
13 + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
14 +
15 + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
16 +
17 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 +notices: []
added .prettierrc
+7 −0
@@ -0,0 +1,7 @@
1 +{
2 + "arrowParens": "avoid",
3 + "bracketSpacing": false,
4 + "semi": false,
5 + "singleQuote": true,
6 + "trailingComma": "es5"
7 +}
modified dist/.github/workflows/licensed.yml
+10 −3
@@ -10,10 +10,17 @@ jobs:
10 10 runs-on: ubuntu-latest
11 11 name: Check licenses
12 12 steps:
13 - uses: actions/checkout@v1.0.0
14 - run: |-
13 + - uses: actions/checkout@v2
14 + - uses: actions/cache@v1
15 + with:
16 + path: ~/.npm
17 + key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
18 + restore-keys: ${{runner.os}}-npm-
19 + - run: npm ci
20 + - name: Install licensed
21 + run: |-
15 22 cd /tmp
16 curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.3.2/licensed-2.3.2-linux-x64.tar.gz
23 + curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.9.2/licensed-2.9.2-linux-x64.tar.gz
17 24 sudo tar -xzf licensed.tar.gz
18 25 sudo mv licensed /usr/local/bin/licensed
19 26 - run: licensed status
modified dist/.github/workflows/test.yml
+1 −1
@@ -22,7 +22,7 @@ jobs:
22 22 - otp-version: 22.0
23 23 elixir-version: master
24 24 steps:
25 - uses: actions/checkout@v1.0.0
25 + - uses: actions/checkout@v2
26 26 - name: Use actions/setup-elixir
27 27 uses: ./
28 28 with:
modified package-lock.json
+6 −0
@@ -412,6 +412,12 @@
412 412 "semver-compare": "^1.0.0"
413 413 }
414 414 },
415 + "prettier": {
416 + "version": "2.0.5",
417 + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz",
418 + "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
419 + "dev": true
420 + },
415 421 "regenerator-runtime": {
416 422 "version": "0.13.5",
417 423 "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
modified package.json
+5 −3
@@ -4,11 +4,12 @@
4 4 "license": "MIT",
5 5 "private": true,
6 6 "scripts": {
7 "build": "ncc build src/setup-elixir.js"
7 + "build": "ncc build src/setup-elixir.js",
8 + "format": "prettier \"src/**/*.js\""
8 9 },
9 10 "husky": {
10 11 "hooks": {
11 "pre-commit": "npm run build && git add dist/"
12 + "pre-commit": "npm run format -- --check && npm run build && git add dist/"
12 13 }
13 14 },
14 15 "dependencies": {
@@ -19,6 +20,7 @@
19 20 },
20 21 "devDependencies": {
21 22 "@zeit/ncc": "^0.22.1",
22 "husky": "^4.2.5"
23 + "husky": "^4.2.5",
24 + "prettier": "^2.0.5"
23 25 }
24 26 }

Parents: f9f935a 13359dc