You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stencil ESlinter missed this reserved property. It's not present in the reserved member rule, which should warn for these.
And we found more unusable / reserved properties by comparing HTMLAttributes interface with the linting rule:
Prerequisites
Stencil ESLint Version
0.4.0
Current Behavior
We created a component with
results
as property:Yet, in React we were unable to bind the correct data:
Completely confused where the intersection type
& number
was coming from.After digging into Stencil we found that
results
was already defined onHTMLAttributes
interface as a number: https://github.com/ionic-team/stencil/blob/main/src/declarations/stencil-public-runtime.ts#L1300Stencil ESlinter missed this reserved property. It's not present in the reserved member rule, which should warn for these.
And we found more unusable / reserved properties by comparing
HTMLAttributes
interface with the linting rule:We verified this with a couple of these properties and got the same behavior as with
results
Expected Behavior
The reserved member linting rule should match the reserved properties in Stencil: https://github.com/ionic-team/stencil/blob/main/src/declarations/stencil-public-runtime.ts#L1238.
Steps to Reproduce
Inconsistent linting
Compare the reserved properties in Stencil with the reserved member linting rule. Or check the reproduce script.
Actual impact on development
Stencil:
React: (with Stencil react output)
Results
ESLint didn't complain.
Working example
With another, not reserved name, it works:
Stencil:
React: (with Stencil react output)
Results
Code Reproduction URL
https://gist.github.com/Ruben-E/091c96ea508ce8fb33eec59d324bdfab
Additional Information
No response
The text was updated successfully, but these errors were encountered: