Skip to content

Commit

Permalink
fix eslint issue (coderabbitai#228)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by openai -->
### Summary by OpenAI

## Release Notes
- Chore: Disable eslint rule that prevents importing unresolved modules.
- Chore: Update import statement for `warning` function in
`@actions/core`.

> "Code quality improved,  
> Eslint rules disabled,  
> Celebrate with joy!"
<!-- end of auto-generated comment: release notes by openai -->
  • Loading branch information
harjotgill authored Apr 21, 2023
1 parent e235353 commit d21dc3b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:import/node"
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
ChatGPTError,
ChatMessage,
SendMessageOptions
// eslint-disable-next-line import/no-unresolved
} from 'chatgpt'
import {OpenAIOptions, Options} from './options'
import {retry} from './utils'
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as core from '@actions/core'
import {warning} from '@actions/core'

export const retry = async <T = unknown>(
fn: Function,
Expand All @@ -12,7 +12,7 @@ export const retry = async <T = unknown>(
if (i === times - 1) {
throw error
}
core.warning(`Function failed on try ${i + 1}, retrying...`)
warning(`Function failed on try ${i + 1}, retrying...`)
continue
}
}
Expand Down

0 comments on commit d21dc3b

Please sign in to comment.