Skip to content

Commit

Permalink
chore: Add ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Dec 12, 2023
1 parent bac416e commit 3124c34
Show file tree
Hide file tree
Showing 7 changed files with 439 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"stripe": "^9.13.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.14.0",
"eslint": "^8.55.0",
"eslint-config-next": "^13.2.4",
"supabase": "^1.115.5",
"typescript": "^5.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function Footer(): React.ReactElement {
target="_blank"
rel="noopener noreferrer"
>
<img src="/powered-by-vercel.svg" />
<img alt="Powered by Vercel" src="/powered-by-vercel.svg" />
</a>
</div>
<Spacer />
Expand Down
3 changes: 2 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const getInitialProps = async (
};
};

export default class extends Document {
export default class MyDocument extends Document {
render(): React.ReactElement {
return (
<Html>
Expand All @@ -43,6 +43,7 @@ export default class extends Document {
src="https://scripts.simpleanalyticscdn.com/auto-events.js"
></script>
<script
async
src="/js/simpleanalytics.js"
type="text/javascript"
></script>
Expand Down
3 changes: 1 addition & 2 deletions src/pages/api/v0/check_email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ async function getVerifMethod(input: CheckEmailInput): Promise<string> {
function removeSensitiveData(output: CheckEmailOutput): CheckEmailOutput {
const newOutput = { ...output };

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// @ts-expect-error - We don't want to store the server name.
delete newOutput.debug?.server_name;

return newOutput;
Expand Down
2 changes: 0 additions & 2 deletions src/util/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import axios, { AxiosError, AxiosResponse } from "axios";
import { NextApiResponse } from "next";
import { RateLimiterRes } from "rate-limiter-flexible";
import retry from "async-retry";

// Gets the currently depoloyed URL.
Expand Down
Loading

0 comments on commit 3124c34

Please sign in to comment.