Skip to content

Improvements coming to lit-analyzer #70

@runem

Description

@runem

Here is an update on what I'm working on at the moment, and which improvement I plan on adding to lit-analyzer. Feel free to add your feedback if you have any features/improvement you really want to see come to this project :-)

During the last couple of weeks I've been working intensely on improving web-component-analyzer (read more in this issue: runem/web-component-analyzer#125)

I've been focusing on these areas:

  • Improve performance
  • Improve JSDoc support and analyzing non-typescript code.
  • Make LitElement-specific metadata available to lit-analyzer
  • Better support for mixins
  • Better component member merging
  • Options to extend HTMLElement with members using TS-typings

Next week I will be turning my focus to lit-analyzer. The update to WCA makes quite a bit possible here:

  • Much better performance (we don't have to analyze every element upfront because this is now lazy. We only have to discover all tag names upfront)
  • It's now possible to add full support for refactoring tag names, events names, attributes and property-names.
  • It's now possible to add more LitElement-specific rules such as "this private member should probably have {attribute: false}"
  • WCA now analyzes private and protected members (previously it just skipped them), making it possible to run LitElement-specific rules on private members as well 🎉
  • WCA now outputs parts (using the jsdoc tag @csspart), making it possible to autocomplete parts in CSS.
  • WCA now analyzes methods, opening the possible to analyze if a call to eg. super.connectedCallback is missing somewhere in the chain.

I will also be taking a look at the following features:

  • Experimental support for libraries containing a "custom-element.json" file
  • Better support for checking which elements are available in a given file (by following imports). In addition, I'm thinking about adding a rule that makes it possible to catch when importing unused elements. In my own code I always forget to remove unused imports when I'm no longer using a specific element anymore.

Thanks for reading through this update. Again, feel free to add your feedback if you have any features/improvement that you really want to see come to this project 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions