GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — fix: show type on invalid semver error by tjenkinson · Pull Request #559 · npm/node-semver Conversation
|
|
Is there really no eslint rule for this? I find that amazing if so. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hmm actually didn't think about that. https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md looks like it may work will give it a go |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Is there something special about rollup or is it a coincidence that it also only supports the same subset of node internals that webpack does? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-nodejs-modules.md Is probably our rule. You'll need to override it in tests and map.js. eslint rules can be extended by adding a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| module.exports = { | ||
| plugins: ['import'], | ||
| rules: { | ||
| 'import/no-extraneous-dependencies': [ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
this may not be required. checking
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It's already in the base ruleset https://github.com/npm/eslint-config/blob/9e87b58d9e049004c802239cab1fabbca67caf74/lib/index.js#L213
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ah yep. I think this config is useful though? The default would allow importing from devDependencies
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The file is already imported as a plugin, so the extra dependency isn't needed. I think a single new rule is all we need here with an allow of ./test and map.js.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Then this needs to be addressed in template-oss, that's not a rule that we'd want to only apply to a single one of our over 80 repos.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Opened npm/template-oss#316
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@wraithgar so given this doesn't follow the standard structure npm/eslint-config#67 doesn't have any effect here, so is the custom config in this PR good to go?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah we'll need a custom config but this one looks to be a bit different in approach than the one we landed on in eslint-config. We should pattern it after the one there but instead of lib and bin it should be bin, classes, functions, internal, and ranges (and now we begin to see why we standardized on lib).
The way this PR currently does it is by completely bypassing the no-extraneous-dependencies rule for the test files, which is a regression.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yep. done!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b185f4d to
199419d
Compare
199419d to
5019bc5
Compare
There was an error while loading. Please reload this page.
By default rollup doesn't understand any node_module dependencies. There is a node-resolve plugin that adds that support for those to be found. It also doesn't pollyfill any node builtins out of the box. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
utilutil
utilutil
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
An alternative would be to use the "browser" field to specify an alternative for util.inspect outside of node, which could be typeof, but then node usage would still get the nice util.inspect experience.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeh I'm not sure if the benefit of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[BUG] Webpack builds are failing as new release 7.5.0 requiers node.js util
There was an error while loading. Please reload this page.