-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for eslint rule protecting against importing packages that aren't in the package.json #8631
Conversation
a340ca8
to
08613c9
Compare
Benchmark ResultsKitchen Sink ✅
Timings
Cold Bundles
Cached Bundles
React HackerNews ✅
Timings
Cold Bundles
Cached BundlesNo bundle changes detected. AtlasKit Editor ✅
Timings
Cold Bundles
Cached Bundles
Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. |
The tests are failing now, and there's a merge conflict |
BTW, that was released in the meantime with 2.27 |
are declared in that package's package.json. Note: This will fail to lint due to correcting the import lint rule Changelog: - Updated eslint version to the latest 7.x.x release - Updated the eslint plugins relevant to the import rule - Updated the root eslintrc.json to include the import rule - Note that this rule must be in the root directory of the workspace See "packageDir" under "options" related to monorepos https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md - Corrected plugin resolution for @parcel/babel-preset
Changelog: - Updated eslint errors unrelated to imports
- Updated @parcel/source-map version - Added elm as a devDependency - Ignoring node_modules/resolve from flow check
…as a built-in global variable no-redeclare"
581d539
to
15bec7d
Compare
4c42950
to
fbc919f
Compare
↪️ Pull Request
This PR corrects the misbehaving
eslint-plugin-import/no-extraneous-dependencies
rule, adding protection against using imports that are not defined in a package's package.jsonNote:
This currently excludes type imports like
import type { Foo } from 'foo'
due to the current version of eslint-plugin-import not including the change which adds support for type imports.I am not sure when they will merge this, the last update was almost a year ago.
💻 Examples
🚨 Test instructions
As this is a linting rule, to test it you can try importing a package that isn't in that package.json to see if it fails
✔️ PR Todo