From 1125b0e248c494f09d346df28174d19ccbd954db Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Sat, 25 Jun 2022 01:08:52 -0400 Subject: [PATCH 1/4] Fix Prettier script name in docs --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 756e1b522..c5f7e131a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ When contributing to this repository, please first discuss the change you wish t 2. Ensure your change passes all of the integration tests. 3. Make sure you update the README if you've made a change that requires documentation. 4. When making a pull request, highlight any areas that may cause a breaking change so the maintainer can update the version number accordingly on the GitHub marketplace and package registries. -5. Make sure you've formatted and linted your code. You can do this by running `yarn format` and `yarn lint`. +5. Make sure you've linted and formatted your code. You can do this by running `yarn lint` and `yarn lint:format`. 6. Fix or add any tests where applicable. You can run `yarn test` to run the suite. As this action is small in scope it's important that a high level of test coverage is maintained. All tests are written using [Jest](https://jestjs.io/). 7. As this package is written in [TypeScript](https://www.typescriptlang.org/) please ensure all typing is accurate and the action compiles correctly by running `yarn build`. From 5f4da0db8652a6dad8beecce1265a26300ce1c29 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Sat, 25 Jun 2022 01:37:55 -0400 Subject: [PATCH 2/4] Lint and format all files --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f78f7af1c..9a66190d2 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "scripts": { "build": "rimraf lib && tsc --declaration", "test": "jest", - "lint": "eslint src/**/*.ts __tests__/**/*.ts", - "lint:format": "prettier --write './**/*.{ts,js,json,yml,md}' './*.{ts,js,json,yml,md}'" + "lint": "eslint .", + "lint:format": "prettier --write ." }, "repository": { "type": "git", From 0d5be683d7fbdb23faa0220f6820adfb51131ae9 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Sat, 25 Jun 2022 02:32:20 -0400 Subject: [PATCH 3/4] Fix files locally and check files in CI --- .github/workflows/build.yml | 3 ++- package.json | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d98c48453..51137cf7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,8 @@ jobs: - name: Install and Test run: | yarn install --frozen-lockfile - yarn lint + yarn lint:check + yarn lint:format:check yarn test - name: Uploade CodeCov Report diff --git a/package.json b/package.json index 9a66190d2..ad5e41142 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,10 @@ "scripts": { "build": "rimraf lib && tsc --declaration", "test": "jest", - "lint": "eslint .", - "lint:format": "prettier --write ." + "lint": "eslint --fix .", + "lint:check": "eslint .", + "lint:format": "prettier --write .", + "lint:format:check": "prettier --check ." }, "repository": { "type": "git", From a848cf0bcb8cd02a1757882576889d56ec576d3e Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Sat, 25 Jun 2022 02:36:17 -0400 Subject: [PATCH 4/4] Fix unformatted files --- README.md | 8 ++++---- integration/index.html | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f22dfc077..6cd1e1404 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ You can view an example of this below. ```yml name: Build and Deploy on: [push] -permissions: +permissions: contents: write jobs: build-and-deploy: @@ -97,7 +97,7 @@ It's recommended that you use [Dependabot](https://docs.github.com/en/code-secur If you do not supply the action with an access token or an SSH key, you must access your repositories settings and provide `Read and Write Permissions` to the provided `GITHUB_TOKEN`, otherwise you'll potentailly run into permission issues. Alternatively you can set the following in your workflow file to grant the action the permissions it needs. ```yml -permissions: +permissions: contents: write ``` @@ -269,7 +269,7 @@ If you're using an operating system such as [Windows](https://www.microsoft.com/ ```yml name: Build and Deploy on: [push] -permissions: +permissions: contents: write jobs: build: @@ -338,7 +338,7 @@ If you're using a custom domain and require a `CNAME` file, or if you require th ```yml name: Build and Deploy -permissions: +permissions: contents: write on: push: diff --git a/integration/index.html b/integration/index.html index 024fc79a4..d427f0c96 100644 --- a/integration/index.html +++ b/integration/index.html @@ -1,12 +1,13 @@ - + Integration Test