Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adds ESLint with default rule-set #23702
Adds ESLint with default rule-set #23702
Changes from 18 commits
2145927
dec0835
da2b9b5
708cadf
5785c3d
7d2c6b9
220b624
204961f
a036090
539c89d
a1a2000
fc81a34
cd9587a
b0bf01e
e925c22
579aebc
74f5daa
9836b64
c56d522
1dd440a
a48e17b
296d9d7
6d252e4
290025c
302a00f
c6e100e
c227473
63dd31e
89c9e1a
0ef0111
3a5a4e0
4fbaac0
0a6df47
d7bbee1
d33f32b
8dee9c4
cfb07a0
d3702aa
f818bc3
cdeec5a
f0f4955
fbac46e
e1bdcb7
df68057
6719fa0
f0954de
1f12e96
1d740b2
0b905f6
1686dfb
c3195e0
51c8aa9
2a81a5c
01462a1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm trying to understand where
@babel/core
and@babel/eslint-parser
parser is used, this will increase install size and run a separate version of Babel than the one that Next.js has bundled which will lead to differences in parsing long-term. We'll likely want to expose a Next.js specific eslint parser.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.
Yeah it'll increase install size unfortunately, but I've set it up to point to
next/babel
so that it stays in line with how Babel is configured in Next.js instead of relying on a user's config.Would it make sense to lift
@babel/core
to the rootpackage.json
in order to share the same version across both workspaces?Do you mean create a separate, custom eslint parser to handle experimental syntax instead of relying on
@babel/eslint-parser
? Wouldn't we still need to align with Babel parsing (or are you thinking that a custom parser could do the same with minimal delta to install size)?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.
Bundling the eslint parser in the same way we bundle Babel with ncc, that'll allow for the parser to use the internal bundled Babel version.
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.
Ah makes sense, thanks.
Done!
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.
It might be good to add docs in the top-level
errors
folder https://github.com/vercel/next.js/tree/canary/errors for these and link to them via https://nextjs.org/docs/messages to allow to us to provide the direct fix needed to resolve the message and then provide additional resources as links in the document.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.
Ooh great point, didn't even know this folder existed 😅
Done! Added a doc page for each rule.
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 is not
await
ed, which means the trace will instantly resolve (0ms) instead of showing the timing.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.
Fixed 👍