Commit 9596b2a
authored
feat(lint): Add configurable rtlActiveValues and invalid-rtl-variant-value rule (#81)
* feat(lint): add configurable rtlActiveValues and invalid-rtl-variant-value rule
Add `rtlActiveValues` PKL config field (default `["On"]`) that controls
which RTL variant values are skipped during export. Previously hardcoded
to `"On"`, now designers using `true/false` or other conventions can
configure this per-entry.
New lint rule `invalid-rtl-variant-value` validates that RTL variant
property values match the configured active values and their known
counterparts (On↔Off, true↔false, True↔False, Yes↔No, 0↔1).
Also improves the empty component error message to show both the icon
name and variant name: `car (RTL=true)` instead of just `RTL=true`.
* docs: add rtlActiveValues documentation to Configuration.md, examples, and rules
* fix(lint): address review findings for rtlActiveValues
- Fix hardcoded "RTL=On" in ImageLoaderBase log message and comments
- Include rtlActiveValues in dedup key for InvalidRTLVariantValueRule
- Add tests for shouldSkipAsRTLVariant with custom activeValues
- Add rtlActiveValues pass-through assertion in IconsLoaderConfigTests
- Test validValues with custom value not in knownPairs
- Fix doc comment accuracy in InvalidRTLVariantValueRule
- Improve Configuration.md example with separate default/alternative
* fix(lint): address Gemini review — nil rtlProperty, images entries, fallbacks
- Skip entries with nil rtlProperty (user explicitly disabled RTL)
- Collect both icons and images entries for validation
- Apply common.icons/images frame/page name fallbacks
- Pre-calculate validValues outside component loop
- Add test for nil rtlProperty skipping1 parent 50f857d commit 9596b2a
37 files changed
Lines changed: 747 additions & 44 deletions
File tree
- .claude/rules
- Sources
- ExFig-Android
- Config
- Export
- ExFig-Flutter/Config
- ExFig-Web/Config
- ExFig-iOS
- Config
- Export
- ExFigCLI
- Context
- ExFig.docc
- Lint
- Rules
- Loaders
- Resources/Schemas
- examples
- Source
- ExFigConfig/Generated
- ExFigCore/Protocol
- Tests/ExFigTests
- Input
- Lint
- Loaders
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| 449 | + | |
449 | 450 | | |
450 | 451 | | |
451 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
0 commit comments