feat: enable @typescript-eslint/recommended in create-next-app --typescript#52845
Conversation
d04e5aa to
6c62e53
Compare
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
1 similar comment
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
|
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
916c007 to
aebad53
Compare
|
I'm going to rebase this branch to get rid of the merge commits. Makes it harder to review in this state. |
9375c2d to
141b92d
Compare
eps1lon
left a comment
There was a problem hiding this comment.
Let's merge this before its 1 year anniversary. Thank you for sticking with it @JoshuaKGoldberg 👍🏻
| } | ||
| ``` | ||
|
|
||
| Those rules are based on [`plugin:@typescript-eslint/recommended`](https://typescript-eslint.io/linting/configs#recommended). |
There was a problem hiding this comment.
@JoshuaKGoldberg It'd be also nice as a follow-up to document how one would opt-into type-aware ESLint rules.
There was a problem hiding this comment.
Yeah! Strong +1.
Since typescript-eslint v8 with the stabilized projectService is coming in a few months, my suggestion would be to procrastinate until then. That way we can use the nice:
{
"extends": ["next/core-web-vitals", "next/typescript",
+ "plugin:@typescript-eslint/recommended-type-checked" // (or similar)
],
+ "parserOptions": {
+ "projectService": true
+ }
}
Fixes #37151.
This differs a bit from the discussed approach for simplicity's sake now that typescript-eslint v6 is out. I started inline comments.This takes the approach suggested in the discussion of adding anext/typescriptlinter preset.Also applies a small refactor to how the strict config is found from the prompt values. Instead of a
.find, I extracted out the specific value into its own function.