Commit Graph

9 Commits

Author SHA1 Message Date
Alexandre Vryghem
aed0460cfe 117616: Created custom sort-standalone-imports rule 2025-05-16 18:13:51 +02:00
Alexandre Vryghem
eb0572640b 117616: Ported themed-decorators rule 2025-05-16 18:13:50 +02:00
Alexandre Vryghem
01c8c60624 117616: Ported unique-decorators rule 2025-05-16 18:13:49 +02:00
Alexandre Vryghem
4200357100 117616: Ported themed-wrapper-no-input-defaults rule 2025-05-16 18:13:49 +02:00
Alexandre Vryghem
abb03799e0 117616: Ported alias-imports rule 2025-05-16 18:13:48 +02:00
Yury Bondarenko
e40b6ae612 Update plugins to support standalone components
- ThemedComponent wrappers should always import their base component. This ensures that it's always enough to only import the wrapper when we use it.
- This implies that all themeable components must be standalone

→ added rules to enforce this
→ updated usage rule to improve declaration/import handling
2024-03-28 18:33:46 +01:00
Yury Bondarenko
6e22b5376a Make rules more type-safe 2024-03-21 10:11:04 +01:00
Yury Bondarenko
b0758c23e5 Enforce plugin structure and generate documentation 2024-03-21 10:11:04 +01:00
Yury Bondarenko
3937be13f2 Custom ESLint rules to enforce new ThemedComponent selector convention
The following cases are covered:
- ThemedComponent wrapper selectors must not start with ds-themed-
- Base component selectors must start with ds-base-
- Themed component selectors must start with ds-themed-
- The ThemedComponent wrapper must always be used in HTML
- The ThemedComponent wrapper must be used in TypeScript _where appropriate_:
  - Required
    - Explicit usages (e.g. modal instantiation, routing modules, ...)
    - By.css selector queries (in order to align with the HTML rule)
  - Unchecked
    - Non-routing modules (to ensure the components can be declared)
    - ViewChild hooks (since they need to attach to the underlying component)

All rules work with --fix to automatically migrate to the new convention
This covers most of the codebase, but minor manual adjustment are needed afterwards
2024-03-21 10:11:04 +01:00