Skip to content

Commit 2f45bdc

Browse files
author
Tim Sinaeve
committed
style: enforce single quotes across codebase
1 parent 046faa4 commit 2f45bdc

27 files changed

+1208
-540
lines changed

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint'],
4+
rules: {
5+
'quotes': 'off',
6+
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }],
7+
'jsx-quotes': ['error', 'prefer-double']
8+
},
9+
ignorePatterns: ['dist', 'node_modules']
10+
};

components/CustomTitleBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const WindowControls: React.FC<{ platform: string, isMaximized: boolean }> = ({
6464
// Fix: Check for electronAPI existence.
6565
if (!window.electronAPI) return null;
6666

67-
const buttonClass = "not-draggable w-12 h-7 flex items-center justify-center transition-colors hover:bg-border-color/50 focus:outline-none";
67+
const buttonClass = 'not-draggable w-12 h-7 flex items-center justify-center transition-colors hover:bg-border-color/50 focus:outline-none';
6868
const closeButtonClass = `${buttonClass} hover:bg-red-500 hover:text-white`;
6969

7070
const controls = (

components/IconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const IconButton: React.FC<IconButtonProps> = ({ children, tooltip, className, v
2323
setIsHovered(false);
2424
}, []);
2525

26-
const baseClasses = "flex items-center justify-center rounded-sm focus:outline-none transition-colors duration-100";
26+
const baseClasses = 'flex items-center justify-center rounded-sm focus:outline-none transition-colors duration-100';
2727

2828
const variantClasses = {
2929
primary: 'text-text-secondary hover:text-text-main hover:bg-border-color/30',

components/InfoView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const InfoView: React.FC<InfoViewProps> = ({
9595

9696
} catch (err) {
9797
if (err instanceof Error) {
98-
console.error("Error fetching documents:", err);
98+
console.error('Error fetching documents:', err);
9999
setError(`Could not load documentation. Error: ${err.message}`);
100100
const errorState = (Object.keys(docFiles) as DocTab[]).reduce((acc, tab) => {
101101
acc[tab] = `# Error\nFailed to load content for ${tab}.`;

components/JsonEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const JsonEditor: React.FC<JsonEditorProps> = ({ value, onChange, readOnly = fal
1818
const highlightedContent = useMemo(() => {
1919
if (typeof Prism === 'undefined' || !Prism.languages.json) {
2020
// Fallback for when Prism isn't loaded yet
21-
return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
21+
return value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
2222
}
2323
// Always use the JSON highlighter. It's robust enough to handle incomplete JSON
2424
// without crashing and prevents the language switching that caused cursor jumps.

components/PromptEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ const DocumentEditor: React.FC<DocumentEditorProps> = ({
686686
if (!content.trim()) return;
687687
await navigator.clipboard.writeText(content);
688688
setIsCopied(true);
689-
addLog('INFO', `Document content copied to clipboard.`);
689+
addLog('INFO', 'Document content copied to clipboard.');
690690
setTimeout(() => setIsCopied(false), 2000);
691691
}, [content, addLog]);
692692

components/PromptHistoryModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const DocumentHistoryModal: React.FC<DocumentHistoryModalProps> = ({ document, o
8383
<p className="text-sm text-text-secondary">Compared to the previous version</p>
8484
</div>
8585
<div className="flex items-center gap-2">
86-
<IconButton onClick={() => handleCopy(selectedVersion.content)} tooltip={isCopied ? "Copied!" : "Copy Content"}>
86+
<IconButton onClick={() => handleCopy(selectedVersion.content)} tooltip={isCopied ? 'Copied!' : 'Copy Content'}>
8787
{isCopied ? <CheckIcon className="w-5 h-5 text-success" /> : <CopyIcon className="w-5 h-5" />}
8888
</IconButton>
8989
<Button onClick={() => onRestore(selectedVersion.content)} disabled={selectedIndex === 0} variant="secondary">

components/PromptHistoryView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ const DocumentHistoryView: React.FC<DocumentHistoryViewProps> = ({ document, onB
322322
Inline
323323
</button>
324324
</div>
325-
<IconButton onClick={handleCopy} tooltip={isCopied ? "Copied!" : "Copy Selected Version"} size="xs">
325+
<IconButton onClick={handleCopy} tooltip={isCopied ? 'Copied!' : 'Copy Selected Version'} size="xs">
326326
{isCopied ? <CheckIcon className="w-4 h-4 text-success" /> : <CopyIcon className="w-4 h-4" />}
327327
</IconButton>
328328
<IconButton

components/SettingsTreeEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const ValueEditor: React.FC<{
1919
onSettingChange: (path: (string | number)[], value: any) => void;
2020
}> = ({ path, value, onSettingChange }) => {
2121
const type = getValueType(value);
22-
const inputClass = "w-full p-1 text-sm rounded-md bg-background text-text-main border border-border-color focus:ring-1 focus:ring-primary focus:outline-none";
22+
const inputClass = 'w-full p-1 text-sm rounded-md bg-background text-text-main border border-border-color focus:ring-1 focus:ring-primary focus:outline-none';
2323

2424
switch (type) {
2525
case 'string':

components/SettingsView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ const ProviderSettingsSection: React.FC<SectionProps & { discoveredServices: Dis
606606
const models = await llmDiscoveryService.fetchModels(currentService);
607607
setAvailableModels(models);
608608
} catch (error) {
609-
console.error("Failed to fetch models for current service:", error);
609+
console.error('Failed to fetch models for current service:', error);
610610
setAvailableModels([]);
611611
} finally {
612612
setIsFetchingModels(false);

0 commit comments

Comments
 (0)