Skip to content

bug: decorator is not properly detected by eslint #60

@Jagget

Description

@Jagget

Prerequisites

Stencil ESLint Version

"@stencil/eslint-plugin": "0.3.1",
"@typescript-eslint/eslint-plugin": "5.1.0",
"@typescript-eslint/parser": "5.1.0",
"eslint": "8.0.1",
"eslint-plugin-react": "7.26.1",

Current Behavior

The component:

@Component({
  tag: 'signup',
  scoped: false,
  shadow: false,
})
export class Signup implements ComponentInterface {
  @Prop() active: boolean = false;
  render(): any {
    return <Host />;
  }
}

the error:

The @Prop decorator can only be applied to class properties   @stencil/decorators-context

Expected Behavior

No error

Steps to Reproduce

npm init stencil
npx: installed 1 in 1.681s

√ Pick a starter » component
√ Project name » bug

Follow the steps https://github.com/ionic-team/stencil-eslint/blob/main/README.md

Run npm run lint

Code Reproduction URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions