Skip to content

Commit ead2c83

Browse files
committed
Fix eslint config, Fix editor settings, and fix small sidebar UI misplacment
1 parent d772920 commit ead2c83

File tree

14 files changed

+163
-137
lines changed

14 files changed

+163
-137
lines changed

.eslintrc.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"i18n-ally.localesPaths": ["src/_locales"],
3+
"i18n-ally.sourceLanguage": "en",
4+
"i18n-ally.enabledParsers": ["json"],
5+
}

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,14 @@ npm build.js
4545

4646
## TODO List
4747

48-
### Element inspector
49-
* [ ] Fix element inspector aplication
50-
* [ ] Add element inspector to AI
51-
5248
### Editor
5349

54-
* [ ] Reduce editor bundle size (~1.4 MB currently)
55-
* [ ] Split large editor manager files into smaller modules
56-
* [ ] Enhance extension management for CodeMirror
5750
* [ ] Link CodeMirror minimap toggle
5851
* [ ] Move helper functions (`exportScript`, `generateTamperMonkeyHeader`) to separate files
5952

6053
### UI
6154
* [ ] Fix editor optimizations
6255
* [ ] Can you make it so if you have mutiple scripts running at once on the same page the notifications will expand verticlly and not all overlap
63-
* [ ] Improve AI settings UI layout
6456

6557
---
6658

buildScripts/build-firefox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ firefoxManifest.permissions = (firefoxManifest.permissions || []).filter(
5656
if (firefoxManifest.content_scripts) {
5757
firefoxManifest.content_scripts = firefoxManifest.content_scripts.map(
5858
(cs) => {
59-
const { world, ...rest } = cs;
59+
const { world, ...rest } = cs; // eslint-disable-line no-unused-vars
6060
return rest;
6161
}
6262
);

eslint.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import globals from "globals";
2+
3+
export default [
4+
{
5+
ignores: ["build/**"],
6+
},
7+
{
8+
languageOptions: {
9+
ecmaVersion: "latest",
10+
sourceType: "module",
11+
globals: {
12+
...globals.browser,
13+
...globals.es2021,
14+
...globals.webextensions,
15+
GM_addElement: "readonly",
16+
GM_addStyle: "readonly",
17+
GM_setValue: "readonly",
18+
GM_getValue: "readonly",
19+
GM_deleteValue: "readonly",
20+
GM_listValues: "readonly",
21+
GM_openInTab: "readonly",
22+
GM_notification: "readonly",
23+
GM_getResourceText: "readonly",
24+
GM_getResourceURL: "readonly",
25+
GM_xmlhttpRequest: "readonly",
26+
GM_setInnerHTML: "readonly",
27+
GM_createHTML: "readonly"
28+
}
29+
},
30+
rules: {
31+
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }]
32+
}
33+
}
34+
];

eslint.config.mjs

Lines changed: 0 additions & 9 deletions
This file was deleted.

package-lock.json

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"scripts": {
1111
"build": "npm run build:chrome",
1212
"build:chrome": "node buildScripts/build-chrome.js --browser=chrome",
13-
"build:firefox": "node buildScripts/build-firefox.js --production"
13+
"build:firefox": "node buildScripts/build-firefox.js --production",
14+
"lint": "eslint ."
1415
},
1516
"dependencies": {
1617
"@babel/runtime": "7.28.4",

src/ai_dom_editor/settings/ai_settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ class AISettings {
716716
}
717717
}
718718

719-
let aiSettings;
719+
let aiSettings; // eslint-disable-line no-unused-vars
720720

721721
document.addEventListener("DOMContentLoaded", () => {
722722
aiSettings = new AISettings();

src/assets/styles/editor/e_sidebar.css

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,30 +175,26 @@
175175
.panel-content {
176176
flex: 1;
177177
overflow-y: auto;
178-
padding: var(--space-sm);
178+
padding: var(--space-sm) 0 var(--space-sm) var(--space-sm); /* Adjusted padding */
179179
scrollbar-width: thin;
180180
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
181-
}
182-
.panel-content::-webkit-scrollbar { width: var(--scrollbar-width); }
181+
}.panel-content::-webkit-scrollbar { width: var(--scrollbar-width); }
183182
.panel-content::-webkit-scrollbar-track { background: var(--scrollbar-track); }
184183
.panel-content::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: var(--radius-sm); }
185184
.panel-content::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
186185

187186
#execution-panel .panel-content,
188-
#info-panel .panel-content { padding: var(--space-md); }
189187
#execution-panel .form-group,
190-
#info-panel .form-group { margin-bottom: var(--space-md); }
191188
#execution-panel .url-input-group,
192189
#execution-panel .pattern-builder,
193190
#execution-panel .generated-pattern-group { margin-bottom: var(--space-md); gap: var(--space-md); }
194191
#execution-panel .generated-pattern-group { margin-top: var(--space-md); }
195192

196193
/* Forms */
197-
.form-grid { display: flex; flex-direction: column; gap: var(--space-sm); }
194+
.form-grid { display: flex; flex-direction: column; gap: var(--space-sm); width: 100%; }
198195
.form-group { margin-bottom: 0; position: relative; }
199196

200197
.form-label {
201-
display: flex;
202198
align-items: center;
203199
gap: var(--space-xs);
204200
margin-bottom: var(--space-xs);
@@ -351,7 +347,8 @@
351347
.resource-list::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
352348

353349
.url-item,
354-
.resource-item {
350+
.resource-item,
351+
.require-item {
355352
display: flex;
356353
align-items: center;
357354
justify-content: space-between;
@@ -420,7 +417,8 @@
420417
}
421418

422419
.url-text,
423-
.resource-text {
420+
.resource-text,
421+
.require-item > span {
424422
font-family: var(--font-mono);
425423
font-size: var(--text-xs);
426424
color: var(--text-accent);
@@ -430,7 +428,8 @@
430428

431429
.remove-url-btn,
432430
.remove-resource-btn,
433-
.remove-btn {
431+
.remove-btn,
432+
.remove-require-btn {
434433
display: flex;
435434
align-items: center;
436435
justify-content: center;

0 commit comments

Comments
 (0)