🎨 Lint code

This commit is contained in:
journey-ad 2024-06-19 16:27:45 +08:00
parent 307476421a
commit 0e70242792
5 changed files with 16 additions and 11 deletions

View File

@ -88,11 +88,5 @@
"next": ["const", "let", "var"]
}
]
},
"prettier/prettier": [
"warn",
{
"endOfLine": "auto"
}
]
}
}

11
.prettierrc.js Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'always',
endOfLine: 'auto',
};

View File

@ -26,7 +26,7 @@ const query = gql`
`;
// Function to handle GET requests
const handler = async(request: Request) => {
const handler = async (request: Request) => {
const { searchParams } = new URL(request.url);
const hash = searchParams.get("hash");
@ -75,6 +75,6 @@ const handler = async(request: Request) => {
},
);
}
}
};
export { handler as GET, handler as POST };

View File

@ -119,6 +119,6 @@ const handler = async (request: Request) => {
},
);
}
}
};
export { handler as GET, handler as POST };

View File

@ -141,5 +141,5 @@ export const $env = {
},
};
export { Cookie }
export { Cookie };
export { Toast } from "./Toast";