diff options
author | 2023-07-23 20:08:52 -0600 | |
---|---|---|
committer | 2023-07-25 07:45:23 +0000 | |
commit | 8c131073730ec684145c2cc8ee8d6b39bbe9278d (patch) | |
tree | 1129d432ae88475909f0e5d38960395b75364902 /src/webview/contextMenuBuilder.ts | |
parent | 6.4.1-nightly.11 [skip ci] (diff) | |
download | ferdium-app-8c131073730ec684145c2cc8ee8d6b39bbe9278d.tar.gz ferdium-app-8c131073730ec684145c2cc8ee8d6b39bbe9278d.tar.zst ferdium-app-8c131073730ec684145c2cc8ee8d6b39bbe9278d.zip |
chore: improve lint setup
- update eslint config
- merged eslint rules for JS and TS to avoid duplicates
- extended stricter lint ruleset from typescript-eslint
- corrected wrong setup for certain eslint rulesets
- opt in to reportUnusedDisableDirectives config option
- fix or disable a lot of lint issues throughout codebase
- remove trailingComma: all from prettier config which is default in prettier v3
- add volta configuration to package.json to autoload correct node and pnpm versions
- upgrade all eslint and prettier related dependencies to latest
- remove config options from settings.json which are default anyways
- remove config options from settings.json which are outdated/unknown
- set up prettier as default formatter in settings.json
Diffstat (limited to 'src/webview/contextMenuBuilder.ts')
-rw-r--r-- | src/webview/contextMenuBuilder.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/webview/contextMenuBuilder.ts b/src/webview/contextMenuBuilder.ts index 6d904eee3..d18bc56f9 100644 --- a/src/webview/contextMenuBuilder.ts +++ b/src/webview/contextMenuBuilder.ts | |||
@@ -52,8 +52,8 @@ function translatePopup(res, isError: boolean = false) { | |||
52 | z-index: 999999; | 52 | z-index: 999999; |
53 | ${ | 53 | ${ |
54 | isError | 54 | isError |
55 | ? `background: rgb(255 37 37);` | 55 | ? 'background: rgb(255 37 37);' |
56 | : `background: rgb(131 131 131);` | 56 | : 'background: rgb(131 131 131);' |
57 | } | 57 | } |
58 | border-radius: 8px; | 58 | border-radius: 8px; |
59 | top: 5%; | 59 | top: 5%; |
@@ -148,7 +148,7 @@ const contextMenuStringTable: ContextMenuStringTable = { | |||
148 | paste: () => 'Paste', | 148 | paste: () => 'Paste', |
149 | pasteAndMatchStyle: () => 'Paste and match style', | 149 | pasteAndMatchStyle: () => 'Paste and match style', |
150 | searchWith: ({ searchEngine }) => `Search with ${searchEngine}`, | 150 | searchWith: ({ searchEngine }) => `Search with ${searchEngine}`, |
151 | translate: () => `Translate to ...`, | 151 | translate: () => 'Translate to ...', |
152 | quickTranslate: ({ translatorLanguage }) => | 152 | quickTranslate: ({ translatorLanguage }) => |
153 | `Translate to ${translatorLanguage}`, | 153 | `Translate to ${translatorLanguage}`, |
154 | translateLanguage: ({ translatorLanguage }) => `${translatorLanguage}`, | 154 | translateLanguage: ({ translatorLanguage }) => `${translatorLanguage}`, |
@@ -798,6 +798,7 @@ export class ContextMenuBuilder { | |||
798 | callback: { | 798 | callback: { |
799 | (dataURL: any): void; | 799 | (dataURL: any): void; |
800 | (dataURL: any): void; | 800 | (dataURL: any): void; |
801 | // eslint-disable-next-line @typescript-eslint/unified-signatures | ||
801 | (arg0: string): void; | 802 | (arg0: string): void; |
802 | }, | 803 | }, |
803 | outputFormat: string = 'image/png', | 804 | outputFormat: string = 'image/png', |