Skip to content

Commit

Permalink
GH-0 fix failing superlint
Browse files Browse the repository at this point in the history
  • Loading branch information
akefirad committed Dec 4, 2023
1 parent 23934a2 commit 7e4da51
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ignorePatterns:
- "**/node_modules/.*"
- "**/dist/.*"
- "**/coverage/.*"
- "**/package-lock.json"

parser: "@typescript-eslint/parser"

Expand All @@ -20,7 +21,6 @@ parserOptions:
sourceType: module
project:
- "./.github/linters/tsconfig.json"
- "./tsconfig.json"

plugins:
- jest
Expand Down
2 changes: 1 addition & 1 deletion .github/linters/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"noEmit": true
},
"include": ["../../__tests__/**/*", "../../src/**/*"],
"exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"]
"exclude": ["../../dist", "../../node_modules", "../../coverage", "../../**/*.json"]
}
10 changes: 9 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1091
. "$(dirname "$0")/_/husky.sh"

npm run lint && npm run format:check
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e4da51

Please sign in to comment.