-
-
Notifications
You must be signed in to change notification settings - Fork 35
bug: props unrelated to HTMLElement are being flagged by reserved-member-names rule #100
Copy link
Copy link
Closed
Labels
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil ESLint Version
0.7.1
Current Behavior
https://github.com/stencil-community/stencil-eslint/pull/67/files introduced properties unrelated to HTMLElement that are being flagged.
For example, a color prop will produce a warning/error despite it not being defined in HTMLElement:
126:28 error The @prop name "color conflicts with a key in the HTMLElement prototype. Please choose a different name @stencil-community/reserved-member-names
Expected Behavior
Only attributes/properties on HTMLElement.prototype to be flagged by the rule.
Steps to Reproduce
The following should produce the error described above:
import { Component, Prop, h } from '@stencil/core';
@Component({
tag: 'my-component',
shadow: true,
})
export class MyComponent {
@Prop() color: string;
render() {
return <div>color is {this.color}</div>;
}
}Code Reproduction URL
https://github.com/ionic-team/stencil-component-starter
Additional Information
No response
Reactions are currently unavailable