Skip to content

Commit

Permalink
chore: add no-console: error
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed May 29, 2024
1 parent ad4e8b5 commit ff644d6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ee/tabby-ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
}
]
}
]
],
"no-console": "error"
},
"settings": {
"tailwindcss": {
Expand Down
4 changes: 2 additions & 2 deletions ee/tabby-ui/app/files/components/source-code-browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,6 @@ const SourceCodeBrowserRenderer: React.FC<SourceCodeBrowserProps> = ({
}
}, [chatSideBarVisible])

console.log('repoMap', repoMap, fileTreeData)

return (
<ResizablePanelGroup
direction="horizontal"
Expand Down Expand Up @@ -576,6 +574,7 @@ async function getInitialFileData(path?: string) {

return { patchMap, expandedKeys, repos }
} catch (e) {
// eslint-disable-next-line no-console
console.error(e)
return {}
}
Expand Down Expand Up @@ -609,6 +608,7 @@ async function getInitialFileData(path?: string) {
result = defaultEntries ?? []
}
} catch (e) {
// eslint-disable-next-line no-console
console.error(e)
return result
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ function computeDecorations(
try {
lineNumber = state.doc.lineAt(range.start)?.number ?? -1
} catch (e) {
console.log('line parse error')
// eslint-disable-next-line no-console
console.error('line parse error')
}
if (lineNumber > -1) {
temp.push({ line: lineNumber, annotation: ann })
Expand Down
4 changes: 3 additions & 1 deletion ee/tabby-ui/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ function isNewVersionAvailable(version?: string, latestRelease?: ReleaseInfo) {
try {
return version && latestRelease && compare(latestRelease.name, version, '>')
} catch (err) {
// Handle invalid semver
// eslint-disable-next-line no-console
console.warn(err)

// Handle invalid semver
return true
}
}
1 change: 1 addition & 0 deletions ee/tabby-ui/lib/tabby/token-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class TokenManager {
async refreshToken(doRefreshToken: () => Promise<AuthData | undefined>) {
try {
if (typeof navigator?.locks === 'undefined') {
// eslint-disable-next-line no-console
console.error(
'The Web Locks API is not supported in your browser. Please upgrade to a newer browser version.'
)
Expand Down

0 comments on commit ff644d6

Please sign in to comment.