* build(lint): replace @html-eslint with a custom SVG ESLint plugin
The HTML parser recovers from malformed markup and has no way to
disallow text nodes, so a stray `]` could be committed to an icon.
Add scripts/eslint/svgPlugin with its own strict XML parser and rules
tailored to the icon code conventions:
- no-text: disallow text nodes and CDATA sections
- allowed-elements: `<svg>` root containing only shape elements
- allowed-attrs: per-element attribute allowlist
- the existing checks (required svg attributes, fill/stroke values,
duplicate attributes, indentation, spacing, newlines, quotes,
self-closing tags, empty lines, trailing spaces)
Malformed files (unclosed or mismatched tags, unquoted attributes,
several roots) are now parsing errors.
Also add a `lint:svg:icons` script, include it in `lint:icons:all`, and
run the plugin's tests as part of `test:scripts`.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9u8FhtVwYGj5HsHrYP3kq
* build(lint): run the SVG ESLint rules on staged icons
Prettier can't remove a stray text node or a disallowed element, so
lint staged icons with ESLint after formatting them. This stops such an
icon at commit time instead of in CI.
Also document `lint:svg:icons` in the icon code conventions.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9u8FhtVwYGj5HsHrYP3kq
* refactor(lint): parse SVG icons with saxes and leave formatting to Prettier
The plugin's hand-written XML parser was large because it validated the
markup itself and tracked the position of every attribute, quote and
bracket for the formatting rules.
Parse with saxes instead, a strict XML parser that is already installed
through jsdom. The parser module now only turns its events into a tree
with positions. It yields the same tree as before for every icon.
Drop the eight formatting rules. A file that passes the Prettier check is
identical to Prettier's output, so they could never report anything on
it. ESLint now checks what an icon contains and Prettier how it is
formatted. `no-duplicate-attrs` goes too, since saxes rejects a
duplicate attribute as a parsing error.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9u8FhtVwYGj5HsHrYP3kq
* refactor(lint): move the ESLint plugins to tools/eslint-plugin in TypeScript
Move everything in scripts/eslint (the SVG plugin, the JSON Schema plugin
and the GitHub formatter) to a workspace package, @lucide/eslint-plugin,
next to the other internal tools, and convert it to TypeScript.
The package declares its own dependencies (saxes, ajv,
jsonc-eslint-parser), so saxes and ajv leave the root manifest. Rules are
typed against their own AST nodes instead of `any`. The tests run on
vitest like the other tools, through `pnpm test:eslint-plugin`, and a
new workflow runs them and the typecheck when the package changes.
Rule names and behaviour are unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G9u8FhtVwYGj5HsHrYP3kq
* Add svgo rule
* Fix codeQL issue
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Adjust accessibility behaviour for title elements
* Adjust angular package as well
* Fix types
* fix(packages/angular): use fixture.whenStable instead of triggering change detection manually
detectChanges() explicitly forces a check, so it can mask missing automatic change detection
* test(packages/angular): add test for non-signal bound aria attribute
* fix(angular): preserve explicit aria-hidden and support input bindings
---------
Co-authored-by: Karsa <contact@karsa.org>
* fix(packages): render Icon children in solid and lucide-solid
* fix(solid): avoid extra marker nodes when Icon has no children
* Fix solid render
* Format code
---------
Co-authored-by: grzdev <grzdev@users.noreply.github.com>
Co-authored-by: Eric <eric.fennis@gmail.com>
* feat(icons): delegated various sports icons from lab
* feat(icons): moved american football related metadata to rugby-ball, renamed soccer-ball to football
* feat(icons): added consistent `person-*` icon group
* feat(icons): added consistent `person-*` icon group
* feat(icons): add more sports related tags to person icons
* feat(icons): fix name & metadata for persons-standing
* fix(icons): rename `person-standing` to `person`, and add `person-standing` as an alias to `person-arms-spread`
* Apply batched suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* ci: show icon previews in the PR description
Replace the icon-preview comment action with a workflow that writes a
preview image per added or changed icon into the PR description, between
the "Icon preview" markers from the PR template. The images are served by
review.lucide.dev, so the workflow no longer needs dependencies or the
PR's SVGs.
- scripts/updatePullRequestDescriptionPreview.mts renders the markup and
replaces it between the markers (idempotent, keeps CRLF bodies and the
surrounding text as is), and updates the body through the REST API.
- .github/workflows/pull-request-description-preview.yml runs it on
pull_request_target from the base branch only.
- Add the "Icon preview" section with the markers to the PR template.
- Remove the pull-request-icon-preview workflow and the icon-preview action.
Co-Authored-By: Claude <noreply@anthropic.com>
* ci: move the PR description preview into the icon-preview action
Move the description preview script and its tests from scripts/ into
.github/actions/icon-preview, a composite action like the old one, with a
package.json (start, debug, test) and an .env.example for local runs. The
workflow now calls the action with the PR number, head SHA, changed files
and token as inputs.
Co-Authored-By: Claude <noreply@anthropic.com>
* ci: adjust the icon-preview action instead of adding a new workflow
Restore the icon-preview action and its workflow from main and adjust
them in place: the action now runs updatePullRequestDescriptionPreview.mts
(Node built-ins only, so no dependencies or install step) to write the
previews into the PR description, and the workflow calls it with the PR
number, head SHA, changed files and token. The separate
pull-request-description-preview workflow is removed.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(icon-preview): remove a lone marker before adding a fresh pair
When only the start or the end marker is left in the description, remove
it (with its line break) before prepending a new marker pair, so the
body never keeps an orphan marker.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* elk icon
* elk.json
* more padding between entities to make all strokewidths look better
* fixed tiny error
* Move icon to lab
---------
Co-authored-by: Eric <eric.fennis@gmail.com>
* feat(icons): delegated various sports icons from lab
* feat(icons): moved american football related metadata to rugby-ball, renamed soccer-ball to football
* feat(icons): updated basketball icon to better match a real basketball
* feat(icons): updated soccer ball design