Closed 43081j closed 10 months ago
@ajbrun it doesn't look like a new package has been published since this merged, so this feature isn't currently usable -- would you be able to deploy to NPM?
i'll publish a new version today or tomorrow if i can 👍 good catch, totally forgot to!
Feature request for this: could internal reactive state properties be exempt from this check?
For example:
static properties = {
publicThing: { attribute: 'public-thing', type: String },
_someInternalState: { state: true }
};
From the Lit docs:
Internal reactive state refers to reactive properties that are not part of the component's public API. These state properties don't have corresponding attributes, and aren't intended to be used from outside the component. Internal reactive state should be set by the component itself.
So since these state properties never map to an attribute, I don't think this rule should apply to them.
This introduces a new rule:
attribute-names
.The rule enforces that all attributes are lowercase if the associated property is not.
For example:
This will fail since the default attribute will be
camelCase
, and therefore not lowercase.This should instead be:
Though in this rule, for now, the fact it is snake-case is a preference rather than being enforced by the rule.
Fixes #187
cc @ajbrun