Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvements and more #112

Merged
merged 91 commits into from
Jul 15, 2020
Merged

Performance improvements and more #112

merged 91 commits into from
Jul 15, 2020

Conversation

runem
Copy link
Owner

@runem runem commented Jul 4, 2020

Closes #108, closes #103, closes #70, closes #84, closes #90, closes #73, closes #79, closes #66, closes #55, closes #52, closes #53, closes #89, closes #81

Added

  • Added new rule no-property-visibility-mismatch. This rule will ensure public properties use @property and non-public properties use @internalProperty (#100)
  • Added new rule no-missing-element-type-definition This rule will ensure that custom elements are registered on the
    HTMLElementTagNameMap Typescript interface (#73)
  • It's now possible to configure how many modules deep dependencies are followed to determine whether a custom element is available in the current file. When -1 is used, dependencies will be followed infinitely deep. This can be configured for both external dependencies and project dependencies with maxNodeModuleImportDepth & maxProjectImportDepth (#116)
  • In addition to extending HTMLElementTagNameMap it's now also possible extend the HTMLElementEventMap interface and the HTMLElement interface (#53)

Example:

declare global {
  interface HTMLElementTagNameMap {
    "my-element": HTMLElement;
  }
  interface HTMLElementEventMap {
    "my-event": Event;
  }
}

/**
 * @attr my-attr
 */
interface HTMLElement {
  myProperty: string;
}
  • Added autocompletion for CSS shadow parts and CSS custom properties in CSS. It's possible to document those using JSDoc (dd1ffc78)
  • The role and controlslist attributes are now correctly type checked (#89)

Example:

/**
 * @cssprop {Color} --border-color - Sets the color of the border
 * @csspart content - The content of my element
 */
class MyElement extends HTMLElement {
}

Fixed and changed

  • Quick fix for missing imports now generates correct path on Windows (#110)
  • Type checking is now up to 15 times faster
  • is-assignable-in-boolean-binding now also accepts "null" and "undefined" types in boolean bindings. Example: <input ?required="${undefined}" />
  • "Fix message" is now included in the output for the CLI
    -no-unknown-property-converter has been removed and no-incompatible-property-type can be used instead.
  • Improved JSDoc support
  • Improved mixin support
  • Private and protected members are now also analyzed
  • All diagnostics in vscode are now reported as lit-plugin([RULE_ID]) and have unique diagnostic codes (#108)
  • When resolving imports for a given module, facade modules are always followed and do not increase depth (#114)
  • Improve codefix for 'no-missing-import' rule (#117)

Project

  • Refactoring of rule modules
  • Added more tests
  • lit-analyzer now uses data from vscode-web-custom-data
  • cancellationToken is now supported to prevent long running operations

runem and others added 30 commits May 6, 2020 14:05
rule: property visibility mismatch
… only runs on properties where either the property or internalProperty decorator is used
…Fix problems when emitting component based diagnostics
@runem runem changed the title [WIP] Performance improvements and more WIP: Performance improvements and more Jul 14, 2020
@runem runem merged commit bb6ea6d into master Jul 15, 2020
@runem runem changed the title WIP: Performance improvements and more Performance improvements and more Jul 15, 2020
@justinfagnani justinfagnani deleted the 1.2.0 branch April 15, 2022 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment