Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint scripts #1154

Merged
merged 4 commits into from Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -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`.

Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -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:
Expand Down Expand Up @@ -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
```

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions integration/index.html
@@ -1,12 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="UTF-8" />
<title>Integration Test</title>
<meta name="robots" content="noindex" />

<style>
html, body {
html,
body {
height: 100%;
width: 100%;
}
Expand All @@ -29,4 +30,4 @@
<body>
<div class="image"></div>
</body>
</html>
</html>
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -9,8 +9,10 @@
"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 --fix .",
"lint:check": "eslint .",
"lint:format": "prettier --write .",
"lint:format:check": "prettier --check ."
},
"repository": {
"type": "git",
Expand Down