-
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 1 commit
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 |
---|---|---|
|
@@ -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.
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 :)