Shopify / Shopify/theme-tools

Should lint against use of non-explicit dependencies

Open
#210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement tech debt
Dominant language
TypeScript
Stars
234
Forks
92
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
Found a build bug in theme-language-server-node because it was making a require to theme-check-common without it being directly in its package.json. The code worked because it is a dependency of theme-check-node, but the project reference in tsconfig.json file wasn't there, so webpack builds were using both the dist and src code of theme-check-common because of this little mistake.

Describe the solution you'd like

https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing theme-language-server-node's package.json and tsconfig.json, then inspect the existing lint setup for a suitable explicit-dependency rule. Verify the rule against the dependency usage that exposed the theme-check-common build bug, and confirm the lint run catches non-explicit dependencies without breaking valid packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, typescript, webpack
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.