Skip to content

Commit

Permalink
lint rules added and fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinwloring1988 committed Dec 2, 2024
1 parent aef26f1 commit 87620f3
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 117 deletions.
8 changes: 5 additions & 3 deletions app/components/chat/BaseChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
>
<textarea
ref={textareaRef}
className={`w-full pl-4 pt-4 pr-16 focus:outline-none resize-none text-bolt-elements-textPrimary placeholder-bolt-elements-textTertiary bg-transparent text-sm`}
className={
'w-full pl-4 pt-4 pr-16 focus:outline-none resize-none text-bolt-elements-textPrimary placeholder-bolt-elements-textTertiary bg-transparent text-sm'
}
onKeyDown={(event) => {
if (event.key === 'Enter') {
if (event.shiftKey) {
Expand Down Expand Up @@ -351,8 +353,8 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
{input.length > 3 ? (
<div className="text-xs text-bolt-elements-textTertiary">
Use <kbd className="kdb px-1.5 py-0.5 rounded bg-bolt-elements-background-depth-2">Shift</kbd> +{' '}
<kbd className="kdb px-1.5 py-0.5 rounded bg-bolt-elements-background-depth-2">Return</kbd> for
a new line
<kbd className="kdb px-1.5 py-0.5 rounded bg-bolt-elements-background-depth-2">Return</kbd> a
new line
</div>
) : null}
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default async function handleRequest(
.read()
.then(({ done, value }) => {
if (done) {
controller.enqueue(new Uint8Array(new TextEncoder().encode(`</div></body></html>`)));
controller.enqueue(new Uint8Array(new TextEncoder().encode('</div></body></html>')));
controller.close();

return;
Expand Down
4 changes: 2 additions & 2 deletions app/lib/persistence/useChatHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function useChatHistory() {
setReady(true);

if (persistenceEnabled) {
toast.error(`Chat persistence is unavailable`);
toast.error('Chat persistence is unavailable');
}

return;
Expand All @@ -63,7 +63,7 @@ export function useChatHistory() {
description.set(storedMessages.description);
chatId.set(storedMessages.id);
} else {
navigate(`/`, { replace: true });
navigate('/', { replace: true });
}

setReady(true);
Expand Down
4 changes: 3 additions & 1 deletion app/lib/stores/workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ export class WorkbenchStore {
}

// create or get the file
const fileHandle = await currentHandle.getFileHandle(pathSegments[pathSegments.length - 1], { create: true });
const fileHandle = await currentHandle.getFileHandle(pathSegments[pathSegments.length - 1], {
create: true,
});

// write the file content
const writable = await fileHandle.createWritable();
Expand Down
6 changes: 6 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export default [
'@typescript-eslint/no-empty-object-type': 'off',
'@blitz/comment-syntax': 'off',
'@blitz/block-scope-case': 'off',
'array-bracket-spacing': ["error", "never"],
'object-curly-newline': ["error", { "consistent": true }],
'keyword-spacing': ["error", { "before": true, "after": true }],
'consistent-return': "error",
'semi': ["error", "always"],
'arrow-spacing': ["error", { "before": true, "after": true }]
},
},
{
Expand Down
110 changes: 55 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"vite-plugin-node-polyfills": "^0.22.0",
"vite-plugin-optimize-css-modules": "^1.1.0",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.1.6",
"vitest": "^2.1.7",
"wrangler": "^3.91.0",
"zod": "^3.23.8"
},
Expand Down
Loading

0 comments on commit 87620f3

Please sign in to comment.