-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore: bump typescript-eslint to v8 #1936
Changes from all commits
a742add
2b0d1e4
70c1a97
fbe1983
8078722
f12dbe4
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-t3-app": minor | ||
--- | ||
|
||
upgrade to typescript eslint v8 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-t3-app": minor | ||
--- | ||
|
||
upgrade to drizzle-orm@0.33 and corresponding drizzle-kit version |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ const isGitInstalled = (dir: string): boolean => { | |
try { | ||
execSync("git --version", { cwd: dir }); | ||
return true; | ||
} catch (_e) { | ||
} catch { | ||
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. As of typescript-eslint/typescript-eslint#8971, these are now flagged by default by |
||
return false; | ||
} | ||
}; | ||
|
@@ -31,7 +31,7 @@ export const isInsideGitRepo = async (dir: string): Promise<boolean> => { | |
stdout: "ignore", | ||
}); | ||
return true; | ||
} catch (_e) { | ||
} catch { | ||
// Else, it will throw a git-error and we return false | ||
return false; | ||
} | ||
|
@@ -125,7 +125,7 @@ export const initializeGit = async (projectDir: string) => { | |
"git" | ||
)}\n` | ||
); | ||
} catch (error) { | ||
} catch { | ||
// Safeguard, should be unreachable | ||
spinner.fail( | ||
`${chalk.bold.red( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,9 @@ export const logNextSteps = async ({ | |
const pkgManager = getUserPkgManager(); | ||
|
||
logger.info("Next steps:"); | ||
projectName !== "." && logger.info(` cd ${projectName}`); | ||
if (projectName !== ".") { | ||
logger.info(` cd ${projectName}`); | ||
} | ||
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.
|
||
if (noInstall) { | ||
// To reflect yarn's default behavior of installing packages when no additional args provided | ||
if (pkgManager === "yarn") { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,12 +55,14 @@ function checkForLatestVersion(): Promise<string> { | |
resolve((JSON.parse(body) as DistTagsBody).latest); | ||
}); | ||
} else { | ||
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors | ||
reject(); | ||
} | ||
} | ||
) | ||
.on("error", () => { | ||
// logger.error("Unable to check for latest version."); | ||
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors | ||
reject(); | ||
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. This is the first time I can remember seeing
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. probably should reject with a descriptive error xd |
||
}); | ||
}); | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,8 +51,8 @@ | |
"@total-typescript/ts-reset": "^0.3.7", | ||
"@types/eslint": "^8.56.10", | ||
"@types/node": "^20.14.10", | ||
"@typescript-eslint/eslint-plugin": "^7.15.0", | ||
"@typescript-eslint/parser": "^7.15.0", | ||
"@typescript-eslint/eslint-plugin": "^8.1.0", | ||
"@typescript-eslint/parser": "^8.1.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
|
@@ -63,5 +63,9 @@ | |
"prettier": "^3.3.2", | ||
"turbo": "1.13.3-canary.3", | ||
"typescript": "^5.5.3" | ||
}, | ||
"resolutions": { | ||
"@typescript-eslint/eslint-plugin": "8.1.0", | ||
"@typescript-eslint/parser": "8.1.0" | ||
Comment on lines
+67
to
+69
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. can this be removed nnow? 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. looks like something resolved to v7 when removing this so leaving it in |
||
} | ||
} |
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.
https://typescript-eslint.io/blog/announcing-typescript-eslint-v8-beta#project-service: this is our snazzy new way of enabling typed linting. It should be faster and require less configuration.
I couldn't tell from quickly reading the code: what is the
tsconfig.eslint.json
doing differently? Is it still necessary?Btw, I ran hyperfine measurements, and they showed promising performance improvements on my M1 Max Mac Studio:
project
toprojectService
...for an overall performance improvement of roughly 28%.
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.
I can't remember why it's there but from guessing it sounds like
projectService
does it for us :)