diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 9429bb476..a9b79f146 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -45,7 +45,7 @@ jobs: - name: Run prettier run: | npm ci - npx prettier --write . + npm run prettier working-directory: web - uses: mhils/add-pr-ref-in-changelog@main diff --git a/web/README.md b/web/README.md index f9f38b6d1..4c242ac2f 100644 --- a/web/README.md +++ b/web/README.md @@ -13,8 +13,9 @@ - Run `npm test` to run the test suite. -## Linting -- Run `npx prettier --write .` to lint your code. +## Code formatting + +- Run `npm run prettier` to format your code. You can also integrate prettier into your editor, see https://prettier.io/docs/en/editors.html ## Architecture diff --git a/web/package.json b/web/package.json index 0f7440742..df4b2b234 100644 --- a/web/package.json +++ b/web/package.json @@ -4,7 +4,8 @@ "scripts": { "test": "tsc --noEmit && jest --coverage", "build": "gulp prod", - "start": "gulp" + "start": "gulp", + "prettier": "prettier --write ." }, "dependencies": { "@popperjs/core": "^2.9.3",