Skip to content

Commit d45cebd

Browse files
authored
Fix lint scripts (#1154)
* Fix Prettier script name in docs * Lint and format all files * Fix files locally and check files in CI * Fix unformatted files
1 parent c0e8d73 commit d45cebd

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
- name: Install and Test
2828
run: |
2929
yarn install --frozen-lockfile
30-
yarn lint
30+
yarn lint:check
31+
yarn lint:format:check
3132
yarn test
3233
3334
- name: Uploade CodeCov Report

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ When contributing to this repository, please first discuss the change you wish t
99
2. Ensure your change passes all of the integration tests.
1010
3. Make sure you update the README if you've made a change that requires documentation.
1111
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.
12-
5. Make sure you've formatted and linted your code. You can do this by running `yarn format` and `yarn lint`.
12+
5. Make sure you've linted and formatted your code. You can do this by running `yarn lint` and `yarn lint:format`.
1313
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/).
1414
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`.
1515

integration/index.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<meta charset="UTF-8">
4+
<meta charset="UTF-8" />
55
<title>Integration Test</title>
66
<meta name="robots" content="noindex" />
77

88
<style>
9-
html, body {
9+
html,
10+
body {
1011
height: 100%;
1112
width: 100%;
1213
}
@@ -29,4 +30,4 @@
2930
<body>
3031
<div class="image"></div>
3132
</body>
32-
</html>
33+
</html>

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
"scripts": {
1010
"build": "rimraf lib && tsc --declaration",
1111
"test": "jest",
12-
"lint": "eslint src/**/*.ts __tests__/**/*.ts",
13-
"lint:format": "prettier --write './**/*.{ts,js,json,yml,md}' './*.{ts,js,json,yml,md}'"
12+
"lint": "eslint --fix .",
13+
"lint:check": "eslint .",
14+
"lint:format": "prettier --write .",
15+
"lint:format:check": "prettier --check ."
1416
},
1517
"repository": {
1618
"type": "git",

0 commit comments

Comments
 (0)