Skip to content

feat(lint): no deprecated global attribute value#29

Merged
coryrylan merged 5 commits into
mainfrom
topic-lint-fixup-3
Apr 28, 2026
Merged

feat(lint): no deprecated global attribute value#29
coryrylan merged 5 commits into
mainfrom
topic-lint-fixup-3

Conversation

@coryrylan
Copy link
Copy Markdown
Collaborator

@coryrylan coryrylan commented Apr 28, 2026

Summary by CodeRabbit

  • New Features

    • Added a new "stop" icon to the icon library
    • Introduced a lint rule to detect deprecated global attribute values
  • Tests

    • Added comprehensive tests for the new lint rule
  • Style / Examples

    • Updated header branding and panel typography
    • Adjusted spacing/sizing for a labeled progress example
    • Minor docs header layout tweak and updated heatmap story tags
  • Documentation

    • Added lint rule docs; removed the Testing page and updated testing example imports; trimmed Labs content; deleted a migration section
  • Chores / Refactor

    • Bumped a dev tool invocation version; updated starter URLs and permissions; streamlined lint internals and exported value lists

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new HTML ESLint rule to detect and autofix deprecated nve-* attribute values (with tests/docs), refactors lint attribute exports and downstream rules/tests, adds a stop icon and SSR SVG, tweaks examples/docs/layouts, hardcodes starters URLs/removes .npmrc generation, removes testing docs, and bumps a CLI dev-tool version.

Changes

Cohort / File(s) Summary
ESLint rule + tests + docs
projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.ts, projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.test.ts, projects/lint/src/eslint/configs/html.ts, projects/lint/README.md, projects/site/src/docs/lint/index.md
Adds new rule detecting deprecated nve-* attribute values with autofix and suggestion; registers rule in HTML config; adds tests and docs entry.
Lint internals & dependent rules/tests
projects/lint/src/eslint/internals/attributes.ts, projects/lint/src/eslint/rules/no-unexpected-global-attribute-value.ts, projects/lint/src/eslint/rules/no-unexpected-global-attribute-value.test.ts
Makes original VALID_* exports internal, introduces DISTILLED_* exports and isComplexAttributeValue, and updates the unexpected-value rule/tests to consume DISTILLED_* lists (removes prior local simplification exports).
Icon additions (runtime + SSR)
projects/core/src/icon/icons.ts, projects/core/src/icon/server.ts
Adds stop icon entry to ICON_IMPORTS and updates SSR icon registry markup for stop.
Examples, layout, and site docs
projects/core/src/grid/grid.examples.ts, projects/core/src/progress-bar/progress-bar.examples.ts, projects/site/src/_11ty/layouts/docs.11ty.js, projects/site/src/docs/internal/guidelines/component-creation.md, projects/site/src/docs/testing/index.md, projects/site/src/docs/labs/index.md
Adjusts branding/typography and layout tokens in examples, changes docs layout sizing token, updates example import paths in guidelines, removes Testing page, and trims Labs content.
Starters & context changes
projects/internals/tools/src/project/starters.ts, projects/internals/tools/src/context/index.ts, projects/internals/tools/src/context/migration.md
Hardcodes Elements pages base URL in starters, removes per-archive .npmrc generation, removes two Claude MCP playground permissions, and gates playground prompt/context on __ELEMENTS_PLAYGROUND_BASE_URL__; deletes the “Testing Utilities” migration subsection.
Misc CLI & patterns
projects/cli/package.json, projects/internals/patterns/src/heatmap.examples.ts
Bumps @modelcontextprotocol/inspector version in CLI dev script and updates a heatmap story JSDoc tag and example metadata.

Sequence Diagram(s)

sequenceDiagram
    participant Source as "HTML Source"
    participant Parser as "HTML Parser"
    participant ESLint as "ESLint Core"
    participant Rule as "no-deprecated-global-attribute-value"
    participant Fixer as "Auto-fix / Suggestion"

    Source->>Parser: Parse HTML document
    Parser->>ESLint: Emit AST/tokens
    ESLint->>Rule: Evaluate elements & attributes
    Rule->>Rule: Tokenize attribute values, skip bindings, compute replacements
    alt Deprecated tokens found
        Rule->>ESLint: Report error + provide fix & suggestion
        ESLint->>Fixer: Apply autofix or surface suggestion
        Fixer-->>Source: Produce fixed attribute value
    else No deprecated tokens
        Rule-->>ESLint: No report
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A linting hop, I sniff and swap,
Old tokens dropped; new tokens pop.
A tiny stop icon, docs trimmed neat,
Starters hardwired, examples made sweet —
Carrot crunch, commit complete.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main feature addition: a new ESLint rule for detecting and flagging deprecated global attribute values, which is the primary focus of this changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-lint-fixup-3

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.test.ts`:
- Around line 94-117: Add a regression test that ensures repeated non-deprecated
tokens are preserved after autofix: extend the existing tester.run usage for the
rule in no-deprecated-global-attribute-value.test.ts (the same 'multi-token
replacement' scenario) with an additional invalid case where the input contains
repeated tokens (e.g. both occurrences of "grow" repeated), assert the output
preserves repeated tokens after replacement (e.g. both "grow" -> "full" so "grow
grow column" -> "full full column"), and include the corresponding
errors.suggestions.output and errors.data entries so the autofix and suggestion
behavior is validated.

In `@projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.ts`:
- Line 25: The autofix currently uses Array.from(new Set(replaced.flatMap(t =>
t.split(/\s+/)))).join(' ') which deduplicates tokens and changes the user’s
original input; instead, perform token-by-token replacement that preserves
original spacing and token order (do not use Set). Locate the code that builds
the autofix output (the expression using replaced and flatMap) and replace it
with logic that maps over the original attribute string or its token sequence,
replacing only deprecated tokens in-place while keeping duplicates and the
original whitespace/ordering intact (identify this by the variable name replaced
and the current .flatMap(...).join(' ') expression).

In `@projects/site/src/docs/internal/guidelines/component-creation.md`:
- Line 177: The doc contains inconsistent import sources for test utilities:
update the accessibility test snippet that currently imports from
'@nvidia-elements/testing' to use the same package as the unit-test snippet
('@internals/testing'); change the import statement that references
createFixture, elementIsStable, removeFixture (or any of those symbols) so it
imports them from '@internals/testing' instead of '@nvidia-elements/testing' to
avoid copy/paste errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: fdc090b8-089d-45d4-a3b8-77ae28ec0545

📥 Commits

Reviewing files that changed from the base of the PR and between 410c452 and c22a5c4.

⛔ Files ignored due to path filters (3)
  • projects/core/.visual/icon.dark.png is excluded by !**/*.png
  • projects/core/.visual/icon.png is excluded by !**/*.png
  • projects/core/src/icon/icons/stop.svg is excluded by !**/*.svg
📒 Files selected for processing (16)
  • projects/cli/package.json
  • projects/core/src/grid/grid.examples.ts
  • projects/core/src/icon/icons.ts
  • projects/core/src/icon/server.ts
  • projects/core/src/progress-bar/progress-bar.examples.ts
  • projects/internals/patterns/src/heatmap.examples.ts
  • projects/internals/tools/src/context/migration.md
  • projects/internals/tools/src/project/starters.ts
  • projects/lint/README.md
  • projects/lint/src/eslint/configs/html.ts
  • projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.ts
  • projects/site/src/_11ty/layouts/docs.11ty.js
  • projects/site/src/docs/internal/guidelines/component-creation.md
  • projects/site/src/docs/lint/index.md
  • projects/site/src/docs/testing/index.md
💤 Files with no reviewable changes (2)
  • projects/internals/tools/src/context/migration.md
  • projects/site/src/docs/testing/index.md

Comment thread projects/site/src/docs/internal/guidelines/component-creation.md
@coryrylan coryrylan force-pushed the topic-lint-fixup-3 branch from c22a5c4 to b961259 Compare April 28, 2026 03:14
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@projects/internals/tools/src/project/starters.ts`:
- Line 118: The code unconditionally writes a project .npmrc via
writeFile(`${dist}/.npmrc`, `registry=${ELEMENTS_REGISTRY_URL}/`) which can
override user/CI registries; change it to only create/modify the file when
necessary: check ELEMENTS_REGISTRY_URL and skip writing if it is falsy or equals
the public npm default (https://registry.npmjs.org/) or if a user/CI registry is
already configured (e.g. process.env.npm_config_registry or an existing
`${dist}/.npmrc` contains a registry entry); update the logic surrounding the
writeFile call so it returns early when none of those conditions require
changing the registry, otherwise write the registry line as before.
- Around line 20-21: Replace the hard-coded constants ELEMENTS_PAGES_BASE_URL
and ELEMENTS_REGISTRY_URL with values read from environment variables (e.g.
process.env.ELEMENTS_PAGES_BASE_URL and process.env.ELEMENTS_REGISTRY_URL) while
falling back to the current URLs as safe defaults; update the definitions in
starters.ts to use the environment values (and optionally trim/normalise them)
so runtime/CI/staging/mirror or air-gapped setups can override endpoints without
changing code.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 7199efed-1512-41e1-9c60-f819ee3231fa

📥 Commits

Reviewing files that changed from the base of the PR and between c22a5c4 and b961259.

📒 Files selected for processing (10)
  • projects/cli/package.json
  • projects/core/src/grid/grid.examples.ts
  • projects/core/src/progress-bar/progress-bar.examples.ts
  • projects/internals/patterns/src/heatmap.examples.ts
  • projects/internals/tools/src/context/migration.md
  • projects/internals/tools/src/project/starters.ts
  • projects/site/src/_11ty/layouts/docs.11ty.js
  • projects/site/src/docs/internal/guidelines/component-creation.md
  • projects/site/src/docs/labs/index.md
  • projects/site/src/docs/testing/index.md
💤 Files with no reviewable changes (3)
  • projects/site/src/docs/labs/index.md
  • projects/internals/tools/src/context/migration.md
  • projects/site/src/docs/testing/index.md

Comment thread projects/internals/tools/src/project/starters.ts Outdated
Comment thread projects/internals/tools/src/project/starters.ts Outdated
@coryrylan coryrylan force-pushed the topic-lint-fixup-3 branch from b961259 to 7fdb1e3 Compare April 28, 2026 03:22
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
projects/internals/tools/src/project/starters.ts (1)

20-107: ⚠️ Potential issue | 🟠 Major

Restore runtime configurability for ELEMENTS_PAGES_BASE_URL.

Hardcoding the production pages URL removes environment override flexibility (staging/mirror/air-gapped) and makes this module inconsistent with other env-injected URL usage in the toolchain.

Proposed fix
-import { cwd } from 'node:process';
+import { cwd, env } from 'node:process';
@@
-const ELEMENTS_PAGES_BASE_URL = 'https://nvidia.github.io/elements';
+const DEFAULT_ELEMENTS_PAGES_BASE_URL = 'https://nvidia.github.io/elements';
+const ELEMENTS_PAGES_BASE_URL =
+  env.ELEMENTS_PAGES_BASE_URL?.replace(/\/+$/, '') || DEFAULT_ELEMENTS_PAGES_BASE_URL;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/internals/tools/src/project/starters.ts` around lines 20 - 107, The
constant ELEMENTS_PAGES_BASE_URL is hardcoded; restore runtime configurability
by reading the base URL from an environment/config value with a safe default
(e.g., process.env.ELEMENTS_PAGES_BASE_URL ||
'https://nvidia.github.io/elements') and use that variable when building
startersData entries; update any references to ELEMENTS_PAGES_BASE_URL and
ensure startersData (and any exported types) still export the same shape so
consumers of startersData/Starter see no breaking change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@projects/internals/tools/src/project/starters.ts`:
- Around line 20-107: The constant ELEMENTS_PAGES_BASE_URL is hardcoded; restore
runtime configurability by reading the base URL from an environment/config value
with a safe default (e.g., process.env.ELEMENTS_PAGES_BASE_URL ||
'https://nvidia.github.io/elements') and use that variable when building
startersData entries; update any references to ELEMENTS_PAGES_BASE_URL and
ensure startersData (and any exported types) still export the same shape so
consumers of startersData/Starter see no breaking change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 0a3ff961-926b-42ba-bd16-e536c4cdad07

📥 Commits

Reviewing files that changed from the base of the PR and between b961259 and 7fdb1e3.

📒 Files selected for processing (3)
  • projects/cli/package.json
  • projects/internals/tools/src/context/migration.md
  • projects/internals/tools/src/project/starters.ts
💤 Files with no reviewable changes (1)
  • projects/internals/tools/src/context/migration.md

@coryrylan coryrylan force-pushed the topic-lint-fixup-3 branch 2 times, most recently from 1facd89 to 4354973 Compare April 28, 2026 03:50
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
projects/internals/tools/src/project/starters.ts (1)

20-20: ⚠️ Potential issue | 🟠 Major

Restore runtime configurability for the starter base URL.

Hardcoding ELEMENTS_PAGES_BASE_URL removes support for staging/mirror/air-gapped environments and makes all generated starter download URLs environment-inflexible. Keep the current URL as a default, but allow env override.

Proposed fix
-import { cwd } from 'node:process';
+import { cwd, env } from 'node:process';
@@
-const ELEMENTS_PAGES_BASE_URL = 'https://nvidia.github.io/elements';
+const DEFAULT_ELEMENTS_PAGES_BASE_URL = 'https://nvidia.github.io/elements';
+const ELEMENTS_PAGES_BASE_URL =
+  env.ELEMENTS_PAGES_BASE_URL?.trim().replace(/\/+$/, '') || DEFAULT_ELEMENTS_PAGES_BASE_URL;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/internals/tools/src/project/starters.ts` at line 20, The constant
ELEMENTS_PAGES_BASE_URL is hardcoded; change it to read from an environment
override with the current URL as the default so starter download URLs remain
configurable at runtime. Replace the literal with a value derived from
process.env.ELEMENTS_PAGES_BASE_URL (or your project's config/ENV accessor)
falling back to 'https://nvidia.github.io/elements', and ensure any code that
imports/uses ELEMENTS_PAGES_BASE_URL continues to get the resolved string.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.test.ts`:
- Around line 8-11: The file imports the same default export twice
(noDeprecatedAttributeValue and noDeprecatedGlobalAttributeValue) which is
redundant; keep a single import (e.g., import noDeprecatedGlobalAttributeValue,
{ DEPRECATED_ATTRIBUTE_VALUES } from
'./no-deprecated-global-attribute-value.js') and update the rule assignment
(const rule = noDeprecatedGlobalAttributeValue as unknown as JSRuleDefinition)
plus any references later in the test (the assertions around
DEPRECATED_ATTRIBUTE_VALUES and usages between lines ~33-38) to use that single
symbol consistently; remove the duplicate import and adjust tests to reference
the preserved name.
- Around line 94-117: Add a regression test to the existing "multi-token
replacement" tester.run case that verifies expansion+dedup behavior: create an
invalid case where a deprecated token that expands into multiple tokens (e.g.,
'eyebrow' -> 'label sm' as defined by rewriteValue) overlaps with an existing
token in the attribute value (e.g., input value like "eyebrow label"), and
assert the autofix output deduplicates tokens (expected output "label sm") and
the error/suggestion use the same messageId
'unexpected-deprecated-global-attribute-value' and suggestion messageId
'suggest-replace-deprecated-global-attribute-value' so the test exercises
rewriteValue's Array.from(new Set(...)) dedup logic referenced in
no-deprecated-global-attribute-value.ts.

In `@projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.ts`:
- Around line 12-19: DEPRECATED_ATTRIBUTE_VALUES duplicates the deprecated-token
definitions already present in the internals; instead, create a single shared
export in the internals (e.g., export a consolidated map from
projects/lint/src/eslint/internals/attributes.ts) and have both
DEPRECATED_ATTRIBUTE_VALUES (used by no-deprecated-global-attribute-value.ts)
and the logic in no-unexpected-global-attribute-value import and derive their
distilled-value filters and autofix mappings from that single shared export;
update references in the rule file (DEPRECATED_ATTRIBUTE_VALUES) and the other
rule to consume the shared symbol so changes are centralized and the two rules
can no longer drift.

---

Duplicate comments:
In `@projects/internals/tools/src/project/starters.ts`:
- Line 20: The constant ELEMENTS_PAGES_BASE_URL is hardcoded; change it to read
from an environment override with the current URL as the default so starter
download URLs remain configurable at runtime. Replace the literal with a value
derived from process.env.ELEMENTS_PAGES_BASE_URL (or your project's config/ENV
accessor) falling back to 'https://nvidia.github.io/elements', and ensure any
code that imports/uses ELEMENTS_PAGES_BASE_URL continues to get the resolved
string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 5500ccf9-f327-4123-bd73-dd0d61468113

📥 Commits

Reviewing files that changed from the base of the PR and between 7fdb1e3 and 1facd89.

⛔ Files ignored due to path filters (3)
  • projects/core/.visual/icon.dark.png is excluded by !**/*.png
  • projects/core/.visual/icon.png is excluded by !**/*.png
  • projects/core/src/icon/icons/stop.svg is excluded by !**/*.svg
📒 Files selected for processing (20)
  • projects/cli/package.json
  • projects/core/src/grid/grid.examples.ts
  • projects/core/src/icon/icons.ts
  • projects/core/src/icon/server.ts
  • projects/core/src/progress-bar/progress-bar.examples.ts
  • projects/internals/patterns/src/heatmap.examples.ts
  • projects/internals/tools/src/context/migration.md
  • projects/internals/tools/src/project/starters.ts
  • projects/lint/README.md
  • projects/lint/src/eslint/configs/html.ts
  • projects/lint/src/eslint/internals/attributes.ts
  • projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.test.ts
  • projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.ts
  • projects/lint/src/eslint/rules/no-unexpected-global-attribute-value.test.ts
  • projects/lint/src/eslint/rules/no-unexpected-global-attribute-value.ts
  • projects/site/src/_11ty/layouts/docs.11ty.js
  • projects/site/src/docs/internal/guidelines/component-creation.md
  • projects/site/src/docs/labs/index.md
  • projects/site/src/docs/lint/index.md
  • projects/site/src/docs/testing/index.md
💤 Files with no reviewable changes (3)
  • projects/site/src/docs/labs/index.md
  • projects/internals/tools/src/context/migration.md
  • projects/site/src/docs/testing/index.md

Comment on lines +94 to +117
it('should rewrite deprecated tokens within a multi-token value', () => {
tester.run('multi-token replacement', rule, {
valid: [],
invalid: [
{
code: '<div nve-layout="grow column"></div>',
output: '<div nve-layout="full column"></div>',
errors: [
{
messageId: 'unexpected-deprecated-global-attribute-value',
data: { attribute: 'nve-layout', value: 'grow column', alternative: 'full column' },
suggestions: [
{
messageId: 'suggest-replace-deprecated-global-attribute-value',
data: { value: 'grow column', alternative: 'full column' },
output: '<div nve-layout="full column"></div>'
}
]
}
]
}
]
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a regression case for expansion+dedup token rewrites.

Current multi-token coverage validates grow -> full, but it does not pin the intentional dedup behavior when a deprecated token expands (for example, eyebrow -> label sm) and overlaps existing tokens.

🧪 Suggested test addition
       invalid: [
         {
           code: '<div nve-layout="grow column"></div>',
           output: '<div nve-layout="full column"></div>',
@@
             }
           ]
+        },
+        {
+          code: '<div nve-text="label eyebrow"></div>',
+          output: '<div nve-text="label sm"></div>',
+          errors: [
+            {
+              messageId: 'unexpected-deprecated-global-attribute-value',
+              data: { attribute: 'nve-text', value: 'label eyebrow', alternative: 'label sm' },
+              suggestions: [
+                {
+                  messageId: 'suggest-replace-deprecated-global-attribute-value',
+                  data: { value: 'label eyebrow', alternative: 'label sm' },
+                  output: '<div nve-text="label sm"></div>'
+                }
+              ]
+            }
+          ]
         }
       ]

Based on learnings: In projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.ts, rewriteValue intentionally uses Array.from(new Set(...)) to deduplicate autofix tokens for multi-token replacements.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/lint/src/eslint/rules/no-deprecated-global-attribute-value.test.ts`
around lines 94 - 117, Add a regression test to the existing "multi-token
replacement" tester.run case that verifies expansion+dedup behavior: create an
invalid case where a deprecated token that expands into multiple tokens (e.g.,
'eyebrow' -> 'label sm' as defined by rewriteValue) overlaps with an existing
token in the attribute value (e.g., input value like "eyebrow label"), and
assert the autofix output deduplicates tokens (expected output "label sm") and
the error/suggestion use the same messageId
'unexpected-deprecated-global-attribute-value' and suggestion messageId
'suggest-replace-deprecated-global-attribute-value' so the test exercises
rewriteValue's Array.from(new Set(...)) dedup logic referenced in
no-deprecated-global-attribute-value.ts.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
projects/internals/tools/src/project/starters.ts (1)

20-108: ⚠️ Potential issue | 🟠 Major

Restore a configurable pages base URL.

Hardcoding https://nvidia.github.io/elements removes the mirror/staging/air-gapped escape hatch and makes starter generation less portable. Please keep an env/build-time override with the current URL as the default.

Proposed fix
-import { cwd } from 'node:process';
+import { cwd, env } from 'node:process';
@@
-const ELEMENTS_PAGES_BASE_URL = 'https://nvidia.github.io/elements';
+const DEFAULT_ELEMENTS_PAGES_BASE_URL = 'https://nvidia.github.io/elements';
+const ELEMENTS_PAGES_BASE_URL =
+  env.ELEMENTS_PAGES_BASE_URL ?? DEFAULT_ELEMENTS_PAGES_BASE_URL;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/internals/tools/src/project/starters.ts` around lines 20 - 108,
Replace the hardcoded ELEMENTS_PAGES_BASE_URL with a configurable value that
falls back to the current URL; e.g., derive ELEMENTS_PAGES_BASE_URL from an
environment/build-time variable (like process.env.ELEMENTS_PAGES_BASE_URL or a
build-time define) defaulting to 'https://nvidia.github.io/elements', and use
that exported constant in startersData (symbols: ELEMENTS_PAGES_BASE_URL,
startersData) so callers can override the base URL for
mirrors/staging/air-gapped environments while preserving the existing default.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@projects/internals/tools/src/project/starters.ts`:
- Around line 20-108: Replace the hardcoded ELEMENTS_PAGES_BASE_URL with a
configurable value that falls back to the current URL; e.g., derive
ELEMENTS_PAGES_BASE_URL from an environment/build-time variable (like
process.env.ELEMENTS_PAGES_BASE_URL or a build-time define) defaulting to
'https://nvidia.github.io/elements', and use that exported constant in
startersData (symbols: ELEMENTS_PAGES_BASE_URL, startersData) so callers can
override the base URL for mirrors/staging/air-gapped environments while
preserving the existing default.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 633526b6-db81-4b44-8c5e-d5db89f6f7a3

📥 Commits

Reviewing files that changed from the base of the PR and between 1facd89 and 4354973.

📒 Files selected for processing (4)
  • projects/cli/package.json
  • projects/internals/tools/src/context/index.ts
  • projects/internals/tools/src/context/migration.md
  • projects/internals/tools/src/project/starters.ts
💤 Files with no reviewable changes (1)
  • projects/internals/tools/src/context/migration.md

@coryrylan coryrylan changed the title Topic lint fixup 3 feat(lint): no deprecated global attribute value Apr 28, 2026
@coryrylan coryrylan force-pushed the topic-lint-fixup-3 branch 2 times, most recently from 437e65d to 594c667 Compare April 28, 2026 14:04
Signed-off-by: Cory Rylan <crylan@nvidia.com>
Signed-off-by: Cory Rylan <crylan@nvidia.com>
Signed-off-by: Cory Rylan <crylan@nvidia.com>
Signed-off-by: Cory Rylan <crylan@nvidia.com>
@coryrylan coryrylan force-pushed the topic-lint-fixup-3 branch from 594c667 to 4f94a6c Compare April 28, 2026 15:00
Signed-off-by: Cory Rylan <crylan@nvidia.com>
@coryrylan coryrylan merged commit 73e2000 into main Apr 28, 2026
7 of 8 checks passed
@coryrylan coryrylan deleted the topic-lint-fixup-3 branch April 28, 2026 15:45
@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.10 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.1.0 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.8 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.8 🎉

Changelog

3 similar comments
@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.8 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.8 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.8 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.10 🎉

Changelog

@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.8 🎉

Changelog

1 similar comment
@coryrylan
Copy link
Copy Markdown
Collaborator Author

🎉 This issue has been resolved in version 0.0.8 🎉

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants