diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index 657e847..7ecd99c 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -12,6 +12,7 @@ ignorePatterns: - "**/node_modules/.*" - "**/dist/.*" - "**/coverage/.*" + - "**/package-lock.json" parser: "@typescript-eslint/parser" @@ -20,7 +21,6 @@ parserOptions: sourceType: module project: - "./.github/linters/tsconfig.json" - - "./tsconfig.json" plugins: - jest diff --git a/.github/linters/tsconfig.json b/.github/linters/tsconfig.json index a34cf90..8120d7c 100644 --- a/.github/linters/tsconfig.json +++ b/.github/linters/tsconfig.json @@ -5,5 +5,5 @@ "noEmit": true }, "include": ["../../__tests__/**/*", "../../src/**/*"], - "exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"] + "exclude": ["../../dist", "../../node_modules", "../../coverage", "../../**/*.json"] } diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 893b110..05f02a8 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -40,4 +40,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TYPESCRIPT_DEFAULT_STYLE: prettier VALIDATE_JSCPD: false - FILTER_REGEX_EXCLUDE: ".*dist/.*.js" # why the ignorePattern in eslintrc.yml doesn't work? + # Why the ignorePattern in eslintrc.yml doesn't work? + FILTER_REGEX_EXCLUDE: "(.github/workflows/tests.yml)|(.*dist/.*.js)" + # https://github.com/super-linter/super-linter/issues/4023 + # And becuase of this issue, we have to exclude tests.yml above! + # GITHUB_ACTIONS_COMMAND_ARGS: >- + # -ignore 'property "foo" is not defined in object type' + # -ignore 'property "bar" is not defined in object type' + # -ignore 'property "baz" is not defined in object type' + # -ignore 'property "qux" is not defined in object type' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 78aa3e1..42dde22 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,14 +48,17 @@ jobs: - name: BAR is nither exported nor expanded run: | [[ -z $BAR ]] + # shellcheck disable=SC2016 [[ '${{ steps.env.outputs.BAR }}' == '$FOO' ]] - name: BAZ is nither exported nor expanded run: | [[ -z $BAZ ]] + # shellcheck disable=SC2016 [[ '${{ steps.env.outputs.BAZ }}' == '$USER' ]] - name: QUX is nither exported nor expanded run: | [[ -z $QUX ]] + # shellcheck disable=SC2016 [[ '${{ steps.env.outputs.QUX }}' == '$EXTERNAL_QUX' ]] test-export: @@ -74,12 +77,15 @@ jobs: [[ "$FOO" == "foo" ]] - name: BAR is exported, but not expanded run: | + # shellcheck disable=SC2016 [[ "$BAR" == '$FOO' ]] - name: BAZ is exported, but not expanded run: | + # shellcheck disable=SC2016 [[ "$BAZ" == '$USER' ]] - name: QUX is exported, but not expanded run: | + # shellcheck disable=SC2016 [[ "$QUX" == '$EXTERNAL_QUX' ]] test-expand-without-host-env: diff --git a/.husky/commit-msg b/.husky/commit-msg index 7ac4889..e558931 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,5 @@ #!/bin/sh +# shellcheck disable=SC1091 . "$(dirname "$0")/_/husky.sh" npm run lint && npm run format:check diff --git a/.husky/pre-push b/.husky/pre-push index 023f989..63233b6 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,5 @@ #!/bin/sh +# shellcheck disable=SC1091 . "$(dirname "$0")/_/husky.sh" npm run lint && npm run format && npm run package && npm run check:workspace diff --git a/README.md b/README.md index 8c61c72..59ebd4d 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ jobs: run: echo $FOO $BAR ``` -See [tests.yml](.github/workflows/tests.yml) file for different ways of using the action. +See [tests.yml](.github/workflows/tests.yml) file for more examples. ## API