chore: Fix issues

This commit is contained in:
Sidharth Vinod
2024-01-11 22:23:18 +05:30
parent b487ef67b3
commit 6a422ca643
7 changed files with 23 additions and 23 deletions

View File

@@ -4,6 +4,6 @@
"bracketSameLine": true,
"trailingComma": "none",
"printWidth": 100,
"tailwindConfig": "./tailwind.config.cjs",
"tailwindConfig": "./tailwind.config.cjs",
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"]
}

View File

@@ -11,7 +11,7 @@ export const typeInEditor = (
) => {
cy.window().should('have.property', 'editorLoaded', true);
cy.get('#editor').click();
cy.get('#editor').within(($editor) => {
cy.get('#editor').within(() => {
if (bottom) {
cy.get('textarea').type('{pageDown}', { force: true });
}

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

View File

@@ -3,7 +3,7 @@
@tailwind utilities;
.input {
@apply flex-1 border-primary border-solid border-2 rounded;
@apply flex-1 rounded border-2 border-solid border-primary;
}
.action-btn {
@apply btn btn-primary;

View File

@@ -109,7 +109,7 @@ export const loadGistData = async (gistURL: string): Promise<State> => {
throw new Error('Invalid gist provided');
}
gistHistory.reverse();
const entry = gistHistory.slice(-1).pop();
const entry = gistHistory.at(-1);
if (!entry) {
throw new Error('Invalid gist provided');
}

View File

@@ -213,7 +213,7 @@ function getBrowserStorage(
disconnect();
}
},
getValue(key: string): any | null {
getValue(key: string): any {
const value = browserStorage.getItem(key);
return deserialize(value);
},

View File

@@ -35,7 +35,7 @@ export const detectType = (text: string): string | undefined => {
'mindmap'
];
const firstLine = text
.replace(/^\s*%%.*\n/g, '\n')
.replaceAll(/^\s*%%.*\n/g, '\n')
.trimStart()
.split(' ')[0]
.toLowerCase();
@@ -57,22 +57,22 @@ export const saveStatistics = (graph: string): void => {
length < 10
? '0-10'
: length < 25
? '10-25'
: length < 50
? '25-50'
: length < 100
? '50-100'
: length < 200
? '100-200'
: length < 500
? '200-500'
: length < 700
? '500-700'
: length < 1000
? '700-1000'
: length < 1500
? '1000-1500'
: '1500+';
? '10-25'
: length < 50
? '25-50'
: length < 100
? '50-100'
: length < 200
? '100-200'
: length < 500
? '200-500'
: length < 700
? '500-700'
: length < 1000
? '700-1000'
: length < 1500
? '1000-1500'
: '1500+';
logEvent('render', { graphType, length, lengthBucket });
};