eslint-config-next: `satisfies` in HTML attribute produces error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/ysulyma/eslint-config-next-repro
To Reproduce
- Clone the repository
- Run the following
npm install
# works
eslint --config default.json index.tsx
# doesn't work
eslint --config next.json index.tsx
# The prop value with an expression type of TSSatisfiesExpression could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately.
The error only happens when using next/core-web-vitals, not when using the default TypeScript lint settings.
Current vs. Expected behavior
I expected index.tsx to lint without issue, but with the Next plugin I'm receiving the error
The prop value with an expression type of TSSatisfiesExpression could not be resolved. Please file an issue ( https://github.com/jsx-eslint/jsx-ast-utils/issues/new ) to get this fixed immediately.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.3.0: Thu Jan 5 20:50:21 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T8112
Binaries:
Node: 20.10.0
npm: 10.2.3
Yarn: 1.22.19
pnpm: 7.5.2
Relevant Packages:
next: 14.1.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: N/A
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
ESLint (eslint-config-next)
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction repository and inspect index.tsx plus the default.json and next.json ESLint configurations. Run the two provided eslint commands to isolate the next/core-web-vitals behavior, then trace the eslint-config-next rule that processes the JSX attribute. Done means the Next configuration lints the satisfies expression without producing the TSSatisfiesExpression error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, next.js, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100