Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ parserOptions:
plugins:
- jest
- '@typescript-eslint'
- prettier

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- plugin:github/recommended
- plugin:jest/recommended

rules: {
Expand All @@ -46,7 +46,7 @@ rules: {
'no-console': 'off',
'no-unused-vars': 'off',
'prettier/prettier': 'error',
'semi': 'off',
'semi': ['error', 'never'],
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
Expand All @@ -55,7 +55,7 @@ rules: {
['error', { 'accessibility': 'no-public' }],
'@typescript-eslint/explicit-function-return-type':
['error', { 'allowExpressions': true }],
'@typescript-eslint/func-call-spacing': ['error', 'never'],
'func-call-spacing': ['error', 'never'],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
Expand All @@ -68,7 +68,18 @@ rules: {
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-unused-vars':
[
'error',
{
'caughtErrors': 'none',
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'ignoreRestSiblings': true
}
],
'@typescript-eslint/no-unused-expressions':
['error', { 'allowShortCircuit': true }],
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'warn',
Expand All @@ -78,8 +89,8 @@ rules: {
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/semi': 'off',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/type-annotation-spacing': 'off',
'@typescript-eslint/unbound-method': 'error'
}
5 changes: 5 additions & 0 deletions .github/linters/.gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[allowlist]
description = "Allowlisted paths"
paths = [
'''dist/'''
]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,5 @@ The scripts and documentation in this project are released under the

## Contributing

Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of
Please read [CONTRIBUTION.md](./CONTRIBUTION.md) for details on our code of
conduct, and the process for submitting pull requests to us.
4 changes: 4 additions & 0 deletions __mocks__/@actions/core.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exports.getInput = () => ''
exports.setOutput = () => { }
exports.setFailed = () => { }
exports.debug = () => { }
10 changes: 10 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,14 @@ describe('run function', () => {
// Expectations
expect(core.debug).toHaveBeenCalledTimes(14) // Adjust the count based on your actual number of debug logs
})

it('should not call setFailed for non-Error throws', async () => {
jest.spyOn(core, 'getInput').mockImplementationOnce(() => {
throw 'non-error throw'
})

await run()

expect(core.setFailed).not.toHaveBeenCalled()
})
})
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading