Commit 3191f53
committed
Fix: Resolve linting errors and apply previous fixes
This commit addresses linting errors identified after the initial bugfix submission and includes the original intended fixes.
Corrections for linting:
- Modified `package.json` to use `npx eslint` for `lint` and `lint:fix` scripts to ensure the correct local ESLint version is used.
- Added `"webextensions": true` to `.eslintrc.json` under `env` to recognize browser extension global variables like `chrome`.
- Removed the unused function `prepareForForegroundRequests` from `src/content-script/index.jsx`.
Original fixes included:
- In `src/background/index.mjs`:
- Ensured that `port.proxy.postMessage({ session })` is called in `executeApi` even if `port.proxy` already exists.
- Added comprehensive `try...catch` blocks and detailed logging.
- Added 'blocking' to `onBeforeSendHeaders` listener options.
- In `src/content-script/index.jsx`:
- Refactored logic to `manageChatGptTabState` for dynamic and correct (re-)registration of the port listener for ChatGPT Web models.
- Added comprehensive `try...catch` blocks and detailed logging.1 parent cc2b4fe commit 3191f53
File tree
4 files changed
+4
-51
lines changed- src
- background
- content-script
4 files changed
+4
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
459 | 458 | | |
460 | 459 | | |
461 | 460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | 622 | | |
630 | 623 | | |
631 | 624 | | |
| |||
923 | 916 | | |
924 | 917 | | |
925 | 918 | | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
0 commit comments