From 2383403eed6ece177d2715603845e4efcc3d7221 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Fri, 3 Mar 2023 15:07:05 +0100 Subject: [PATCH] Update docs --- .eslintrc.js | 1 - .gitattributes | 1 + .husky/pre-commit | 1 + .husky/pre-push | 1 + .prettierrc.js | 1 - docs/contributors.md | 1 + package.json | 4 ++-- 7 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b20b0ad..c78ea5a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,3 @@ -// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update. module.exports = { extends: [ 'eslint:recommended', diff --git a/.gitattributes b/.gitattributes index f6ac05f..0fe3b2d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ +* text=auto eol=lf .licenses/** -diff linguist-generated=true diff --git a/.husky/pre-commit b/.husky/pre-commit index 1bda9c1..610a0bf 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,3 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" npm run format +npm run lint:fix diff --git a/.husky/pre-push b/.husky/pre-push index 1dc0f9b..42e17da 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -3,3 +3,4 @@ # Tests are not run at push time since they can take 2-4 minutes to complete npm run format-check +npm run lint diff --git a/.prettierrc.js b/.prettierrc.js index 468cdb1..d7133c7 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,4 +1,3 @@ -// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update. module.exports = { printWidth: 80, tabWidth: 2, diff --git a/docs/contributors.md b/docs/contributors.md index c0118f8..0141e97 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -61,6 +61,7 @@ Pull requests are the easiest way to contribute changes to git repos at GitHub. - To implement new features or fix bugs, you need to make changes to the `.ts` files, which are located in the `src` folder - To comply with the code style, **you need to run the `format` script** +- To lint the code, **you need to run the `lint:fix` script** - To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build **Learn more about how to implement tests:** diff --git a/package.json b/package.json index 1a422f7..9bd5b5c 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "main": "lib/setup-dotnet.js", "scripts": { "build": "tsc && ncc build", - "format": "prettier --config ./.prettierrc.js --write **/*.{ts,yml,yaml}", - "format-check": "prettier --config ./.prettierrc.js --check **/*.{ts,yml,yaml}", + "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write **/*.{ts,yml,yaml}", + "format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check **/*.{ts,yml,yaml}", "lint": "eslint --config ./.eslintrc.js **/*.ts", "lint:fix": "eslint --config ./.eslintrc.js **/*.ts --fix", "prepare": "husky install",