Skip to content

hs project lint reports root package missing UI extension lint deps in app-card projects #1607

@luxferre

Description

@luxferre

Summary

hs project lint appears to treat every package.json discovered in a Developer Platform project as a UI extension lint target.

For app-card projects, HubSpot docs place app cards under src/app/cards, with the card package and dependencies in the cards/ directory. If the repository also has a root package.json for unrelated repo tooling, hs project lint reports that root package as missing UI extension lint dependencies and can prompt to install those dependencies at the root.

The root package may have its own linting dependencies/scripts, but its behavior is not the app-card linting contract. The important expectation is that app cards are linted from their own src/app/cards package and node_modules context.

Version

  • @hubspot/cli: 8.6.0
  • Project platform: 2025.2

Relevant docs

The app card reference says app card components are defined within a cards directory under app/, and that the cards directory should contain the card package.json:

https://developers.hubspot.com/docs/apps/developer-platform/build-apps/features/app-cards/reference

The create app card guide says hs project add creates the card files in src/app/cards, including package.json, and hs project install-deps updates the cards/ directory with node_modules and package-lock.json:

https://developers.hubspot.com/docs/apps/developer-platform/build-apps/features/app-cards/create-an-app-card

Project shape

hsproject.json
package.json                 # repo/root tooling, not an app-card package
package-lock.json
src/
  app/
    cards/
      package.json           # app-card package
      package-lock.json
      node_modules/
      eslint.config.js
      ...card sources...

Steps to reproduce

No HubSpot auth/profile is required for the repro.

  1. Create a Developer Platform app-card project with platformVersion: "2025.2" and srcDir: "src".
  2. Keep the app-card package at src/app/cards/package.json.
  3. Add a root package.json for unrelated repo tooling.
  4. Run the non-mutating lint command:
npx hs project lint --install-missing-deps=false

Optionally run the default command to see the install prompt:

npx hs project lint

Actual behavior

hs project lint checks both the root package and src/app/cards as UI extension lint locations.

With --install-missing-deps=false, it reports the root package as missing UI extension lint dependencies. With the default interactive command, it can prompt to install UI extension lint dependencies into the root package.

Expected behavior

hs project lint should lint app cards from the app-card package directory, e.g. src/app/cards, using that package's dependencies and node_modules.

The root package can exist for repository tooling, but it should not be required to contain HubSpot UI extension lint dependencies just because app cards exist under src/app/cards. Root package linting behavior can be undefined, but it should not block or mutate card linting.

Notes

This may be a regression, but I am not certain. The problematic behavior is applying the required UI extension lint dependency set to non-card package locations.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions