-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: make ESLint work and fix lint errors that were undetected before #18639
Changes from all commits
d96fe1e
12c95c4
7cfe6f0
88586ce
17b34f8
ed6c01e
5a89fb0
e1cbbec
70abed6
bc8664a
7b1797d
1999c95
cf18ea9
2845140
16fe6b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,13 @@ module.exports = { | |
"@calcom/eslint/deprecated-imports-next-router": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["packages/trpc/**/*.{tsx,ts}"], | ||
rules: { | ||
"@typescript-eslint/ban-types": "warn", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. otherwise, ~2500 lint errors exist in |
||
"@typescript-eslint/no-explicit-any": "warn", | ||
}, | ||
}, | ||
], | ||
}, | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
// This registers Typescript compiler instance onto node.js. | ||
// Now it is possible to just require typescript files without any compilation steps in the environment run by node | ||
require("ts-node").register(); | ||
require("ts-node").register({ | ||
compilerOptions: { | ||
module: "commonjs", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. force ts-node to compile our ESLint plugin's TS files into CommonJS (which ESLint requires) |
||
}, | ||
}); | ||
|
||
// re-export our rules so that eslint run by node can understand them | ||
module.exports = { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"autoprefixer": "^10.0.1", | ||
"eslint": "^8", | ||
"eslint": "^8.34.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sync version |
||
"eslint-config-next": "14.0.4", | ||
"postcss": "^8", | ||
"tailwindcss": "^3.3.0", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { z } from "zod"; | ||
|
||
const ZFindInputSchema = z.object({ | ||
export const ZFindInputSchema = z.object({ | ||
bookingUid: z.string().optional(), | ||
}); | ||
|
||
export type TFindInputSchema = z.infer<typeof ZFindInputSchema>; | ||
|
||
export { ZFindInputSchema }; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { z } from "zod"; | ||
|
||
const ZInstantBookingInputSchema = z.object({ | ||
export const ZInstantBookingInputSchema = z.object({ | ||
bookingId: z.number(), | ||
}); | ||
|
||
export type TInstantBookingInputSchema = z.infer<typeof ZInstantBookingInputSchema>; | ||
|
||
export { ZInstantBookingInputSchema }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sync version