-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: bump typescript-eslint to v8 with project service #5868
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
Conversation
@JoshuaKGoldberg is attempting to deploy a commit to the trpc Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -3,7 +3,7 @@ | |||
* This file is included in `/next.config.js` which ensures the app isn't built with invalid env vars. | |||
* It has to be a `.js`-file to be imported there. | |||
*/ | |||
/* eslint-disable @typescript-eslint/no-var-requires */ | |||
/* eslint-disable @typescript-eslint/no-require-imports */ |
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.
typescript-eslint/typescript-eslint#8334: we merged the two rules into the one no-require-imports
.
@@ -221,6 +221,7 @@ export default function TodosPage(props: PageProps) { | |||
|
|||
<input | |||
className="new-todo" | |||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | |||
placeholder={t('what_needs_to_be_done') as string} |
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.
This one stumped me. I couldn't reproduce it in a standalone repro: https://github.com/JoshuaKGoldberg/repros/tree/next-18n-and-type-assertion.
...are there some custom fancy types getting added? I time boxed investigating and couldn't find any.
@@ -55,6 +55,7 @@ export function Chat(props: Readonly<{ channelId: string }>) { | |||
livePosts.query.isFetchingNextPage | |||
} | |||
onClick={() => { | |||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | |||
livePosts.query.fetchNextPage(); |
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 don't know why this wasn't flagging before. But it's a legit rule violation.
@@ -59,7 +59,7 @@ export const ssrPrepass: TRPCPrepassHelper = (opts) => { | |||
if (typeof parent.ssr === 'function') { | |||
try { | |||
return await parent.ssr({ ctx: appOrPageCtx.ctx }); | |||
} catch (e) { | |||
} catch { |
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.
As of eslint/eslint#17974 -> eslint/eslint#18043, these are now flagged by default by no-unused-vars
. They were unused before.
@@ -133,7 +133,7 @@ export function createAppRouter() { | |||
const last = items[items.length - 1]; | |||
const nextIndex = db.posts.findIndex((item) => item === last) + 1; | |||
if (db.posts[nextIndex]) { | |||
nextCursor = db.posts[nextIndex]!.createdAt; | |||
nextCursor = db.posts[nextIndex].createdAt; |
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 don't know which bug was fixed here, but this is a legit unnecessary !
.
@@ -120,7 +120,7 @@ export async function generateEntrypoints(rawInputs: string[]) { | |||
pkgJson.funding = ['https://trpc.io/sponsor']; | |||
|
|||
// write package.json | |||
const formattedPkgJson = prettier.format(JSON.stringify(pkgJson), { | |||
const formattedPkgJson = await prettier.format(JSON.stringify(pkgJson), { |
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.
These come from the Prettier update to v3.
#5869 includes that update and subsequent formatting updates.
I got a big branch that will conflict with this (#5865) so hope the changes are mainly automatic |
Oh fun! Yes, these are mostly automatic. I don't mind recreating as needed. 🙂 |
Hey @JoshuaKGoldberg this has been idle for quite a long time so I'm going to close it out. The contribution would be very welcome though if you want to re-open |
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
Closes #5867
🎯 Changes
typescript-eslint
to the latest v8 beta,rc-v8
eslint
to typescript-eslint's minimum supported version, andprettier
to deduplicate shared dependency versionsparserOptions.projectService
, simplifying the ESLint config a bitNote that this is still a beta version of typescript-eslint@v8. So unless you want to live on the edge, I'd suggest waiting until we hit stable this summer to merge.
✅ Checklist