Skip to content

Commit

Permalink
Merge pull request #11 from wavebox/development
Browse files Browse the repository at this point in the history
Linter fixes
  • Loading branch information
Thomas101 authored Mar 18, 2024
2 parents 36611ea + 5c44b6e commit 0a2b73b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/prefer-readonly': 'off'
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/no-unsafe-argument': 'off'
}
}
3 changes: 2 additions & 1 deletion src/Redux/Bot/BotSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ const sendMessageInternal = async (dispatch: AppDispatch, options: SendMessageOp
}

const getFileLanguage = (fileHandle: FSFileSystemFileHandle) => {
const fileExt = fileHandle.name.split('.').at(-1) as string
const fileExt = fileHandle.name.split('.').at(-1)
if (typeof (fileExt) !== 'string') { return 'code' }
switch (fileExt) {
case 'js': return 'JavaScript'
case 'css': return 'CSS'
Expand Down
3 changes: 2 additions & 1 deletion src/Views/Editor/CodeEditor/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ class CodeEditor extends React.PureComponent<Props & React.HTMLAttributes<HTMLDi
*/
#getEditorLanguage = memoizeOne((filename: string | undefined): string | undefined => {
if (filename === undefined) { return undefined }
const ext = filename.split('.').at(-1) as string
const ext = filename.split('.').at(-1)
if (typeof (ext) !== 'string') { return 'code' }
switch (ext) {
case 'js': return 'javascript'
case 'css': return 'css'
Expand Down

0 comments on commit 0a2b73b

Please sign in to comment.