Skip to content

bug: props unrelated to HTMLElement are being flagged by reserved-member-names rule #100

@jcfranco

Description

@jcfranco

Prerequisites

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions