43081j / 43081j/eslint-plugin-lit

no-private-properties checks only usage of attributes in HTML, not definition of property

Open
#255 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
138
Forks
26
Avg merge
23h 29m
Merged PRs (30d)
4

Description

no-private-properties rule checks only usage of attributes in HTML, I would like to forbid definition of private/protected properties/attributes. When a property is private it usually should be turned to a state.

This should be an error
```javascript
class Foo extends LitElement {
@property()
__fooProp;
}
```

And it should suggest to make it public or convert to a state
```javascript
class Foo extends LitElement {
@state()
__fooProp;
}
```

I can do the implementation and open a pull request, but would you go by defining a new rule ? (in that case with which name ?) Or by completing existing rule `no-private-properties` to reject definition of private properties too ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.