Prerequisites
Stencil ESLint Version
1.2.0
Current Behavior
When declaring a @Prop via enum or constant, the props-must-be-readonly is reporting an error although mutable was set to true.
@Prop({ reflect: true, attribute: Attribute.withPadding, mutable: true }) withPadding: boolean = false;
=>
26:77 error Class properties decorated with @Prop() should be readonly stencil/props-must-be-readonly
In comparison, when setting the attribute directly without an enum or const, it works as expected (no error is reported)
@Prop({ reflect: true, attribute: 'with-padding', mutable: true }) withPadding: boolean = false;
Expected Behavior
The @Prop declaration
@Prop({ reflect: true, attribute: Attribute.withPadding, mutable: true }) withPadding: boolean = false;
should not throw an error, as mutable is set to true (cf. docs).
Steps to Reproduce
- Declare a property as above
- Run the linting rules with
props-must-be-readonly enabled
Code Reproduction URL
pinussilvestrus/test-stencil@0d943e6
Additional Information
No response
Prerequisites
Stencil ESLint Version
1.2.0
Current Behavior
When declaring a
@Propvia enum or constant, theprops-must-be-readonlyis reporting an error althoughmutablewas set totrue.=>
In comparison, when setting the
attributedirectly without an enum or const, it works as expected (no error is reported)Expected Behavior
The
@Propdeclarationshould not throw an error, as
mutableis set totrue(cf. docs).Steps to Reproduce
props-must-be-readonlyenabledCode Reproduction URL
pinussilvestrus/test-stencil@0d943e6
Additional Information
No response