Skip to content

Commit

Permalink
Fix lint scripts (#1154)
Browse files Browse the repository at this point in the history
* Fix Prettier script name in docs

* Lint and format all files

* Fix files locally and check files in CI

* Fix unformatted files
  • Loading branch information
nickmccurdy committed Jun 26, 2022
1 parent c0e8d73 commit d45cebd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
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
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

0 comments on commit d45cebd

Please sign in to comment.