Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit d21dc3b

Browse files
authored
fix eslint issue (#228)
<!-- 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 -->
1 parent e235353 commit d21dc3b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.eslintrc.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"plugin:prettier/recommended",
77
"plugin:import/errors",
88
"plugin:import/warnings",
9-
"plugin:import/typescript",
10-
"plugin:import/node"
9+
"plugin:import/typescript"
1110
],
1211
"parser": "@typescript-eslint/parser",
1312
"parserOptions": {

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bot.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
ChatGPTError,
77
ChatMessage,
88
SendMessageOptions
9+
// eslint-disable-next-line import/no-unresolved
910
} from 'chatgpt'
1011
import {OpenAIOptions, Options} from './options'
1112
import {retry} from './utils'

src/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as core from '@actions/core'
1+
import {warning} from '@actions/core'
22

33
export const retry = async <T = unknown>(
44
fn: Function,
@@ -12,7 +12,7 @@ export const retry = async <T = unknown>(
1212
if (i === times - 1) {
1313
throw error
1414
}
15-
core.warning(`Function failed on try ${i + 1}, retrying...`)
15+
warning(`Function failed on try ${i + 1}, retrying...`)
1616
continue
1717
}
1818
}

0 commit comments

Comments
 (0)