Skip to content

Conversation

@18bharathkumar
Copy link

@18bharathkumar 18bharathkumar commented Jan 11, 2026

Summary

This PR fixes extraneous-dependencies/no-extraneous-dependencies warnings while preserving the monorepo’s single-source-of-truth policy for shared dependencies.
closes #1442

Test libraries remain declared only in the root package.json. ESLint is updated to be monorepo-aware so workspace packages can correctly resolve hoisted dependencies.

Changes

  • Removed duplicate test dependency declarations from workspace package.json files
  • Updated eslint.config.mjs to validate dependencies against both root and workspace manifests

Result

  • npm run lint passes
  • npm run check:versions passes
  • ✅ Dependency versions remain centralized and consistent

Copy link
Member

@danielpeintner danielpeintner left a comment

Choose a reason for hiding this comment

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

Thank you 👍

There is a CI consistency check that fails, see https://github.com/eclipse-thingweb/node-wot/actions/runs/20891164482/job/60048975528?pr=1461


// *************** Ensure that only used dependencies are imported ***************
"extraneous-dependencies/no-extraneous-dependencies": "off", // https://github.com/eclipse-thingweb/node-wot/issues/1430
"extraneous-dependencies/no-extraneous-dependencies": "warn", // https://github.com/eclipse-thingweb/node-wot/issues/1430
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"extraneous-dependencies/no-extraneous-dependencies": "warn", // https://github.com/eclipse-thingweb/node-wot/issues/1430
"extraneous-dependencies/no-extraneous-dependencies": "warn",

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.42%. Comparing base (a213417) to head (c3ca5be).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1461      +/-   ##
==========================================
- Coverage   77.44%   77.42%   -0.02%     
==========================================
  Files          83       83              
  Lines       15826    15826              
  Branches     1506     1503       -3     
==========================================
- Hits        12256    12253       -3     
- Misses       3545     3549       +4     
+ Partials       25       24       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +29 to +39
const packageDirs = [__dirname];
const packagesRoot = path.join(__dirname, "packages");
if (fs.existsSync(packagesRoot)) {
fs.readdirSync(packagesRoot).forEach((dir) => {
const pkgPath = path.join(packagesRoot, dir, "package.json");
if (fs.existsSync(pkgPath)) {
packageDirs.push(path.join(packagesRoot, dir));
}
});
}

Copy link
Member

Choose a reason for hiding this comment

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

Any reasons why we are collecting all the package directories?

Comment on lines -92 to +110
"extraneous-dependencies/no-extraneous-dependencies": "off", // https://github.com/eclipse-thingweb/node-wot/issues/1430
// Default rule for root files
"extraneous-dependencies/no-extraneous-dependencies": [
"warn",
{
packageDir: [__dirname],
},
],
Copy link
Member

Choose a reason for hiding this comment

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

Why we don't simply apply it to all?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint Warning extraneous-dependencies/no-extraneous-dependencies

3 participants