Review main Merged

77937[TASK] Add eslint rules for web components

Andreas Kienast CR +2 V +2 Hard +324 −148 updated 02/23/23, 21:02

Commit message

The eslint plugins `eslint-plugin-lit` and `eslint-plugin-wc` are
installed and configured to help avoiding common issues when developing
web components. These rules already revealed issues in our codebase
that are now fixed.

The most important ones are listed below:

`lit/no-native-attributes`:
Using native HTML attributes as web component attributes may cause
side-effects, like `title` which renders a tooltip on hover.

`lit/prefer-nothing`:
It's preferred to return `nothing` instead of empty templates for
performance reasons.

`wc/require-listener-teardown`:
To avoid memory leaks, any attached event listener in a web component
must be detached again once the element is destroyed.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Markus Klein +1
  • Verified V +2 Done
    • Benni Mack +2
    • Markus Klein +1
    • core-ci +1 CI

Issues 1

Files 38

Show 18 more files

Review log 710

  1. Andreas Kienast uploaded patch set 1 02/23/23, 13:57

  2. Andreas Kienast uploaded patch set 2 02/23/23, 14:11

  3. core-ci voted on patch set 1 V +1 02/23/23, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38020

  4. core-ci voted on patch set 2 V -1 02/23/23, 14:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38021

  5. Andreas Kienast uploaded patch set 3 V -1 02/23/23, 14:44

  6. core-ci voted on patch set 3 V +1 02/23/23, 14:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38024

  7. Benni Mack voted on patch set 3 V +1 CR +1 02/23/23, 20:14

  8. Markus Klein voted on patch set 3 V +1 CR +1 02/23/23, 20:27

  9. Benni Mack voted on patch set 3 V +2 CR +2 02/23/23, 21:02

  10. Benni Mack merged patch set 4 02/23/23, 21:02