eslint-plugin-wc
eslint-plugin-wc copied to clipboard
ESLint rules for Web Components
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. Commits 7efb22a 1.2.6 ef88b93 security notice for additional prototype pollution issue c2b9819 isConstructorOrProto adapted from PR bc8ecee test from prototype pollution PR See full...
I've been doing a lot of workshops where people learn to use lit-html. One of the most common mistakes is to forget calling super.connectedCallback() when using lit-element. This would be...
It should be relatively easy to produce a fix for `wc/no-closed-shadow-root` rule on error. Taking `.attachShadow({ mode: 'closed' })` to `.attachShadow({ mode: 'open' })`
It should be relatively simple to add a fix for `wc/guard-super-call` Take a simple error state such as: ```js connectedCallback() { super.connectedCallback(); this.setAttribute('bar', 'baz'); } ``` and change it to...
As @bennypowers points out in his tweet, https://twitter.com/PowersBenny/status/1383706876106395648 It can be detrimental to performance to set `innerHTML` inside the constructor. To accomplish this in a more performant way, you can...
I have seen quite a bit recently a pattern of a static getter or property for the component name. We could fairly easily add an opt-in rule for this. Something...
You could in theory have constructor parameters as long as they are optional: ```ts class Foo extends HTMLElement { constructor(a?: string, b?: string) { // fine } } ``` We...
> Global attributes are those that are present on all HTML elements. Some examples include `tabindex` and `role`. A custom element may wish to set its initial `tabindex` to `0`...
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.14.2 to 7.23.2. Release notes Sourced from @babel/traverse's releases. v7.23.2 (2023-10-11) NOTE: This release also re-publishes @babel/core, even if it does not appear in the linked release...
It'd be nice to ignore abstract classes by default. Yes, I know you have to use @typescript-eslint/parser as parser, but please. :P edit: Oh, you already depends on typescript-eslint, then...