-
-
Notifications
You must be signed in to change notification settings - Fork 221
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(ruleset-bundler): improve package import heuristics #1985
Conversation
const path = id.split('/'); | ||
|
||
if (path.length > 0 && isValidPackageName(path[0])) { | ||
if (isPackageImport(id)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be safe, I already account for a variety of situations
https://github.com/stoplightio/spectral/blob/0ae8242f8ec6e36c4876f47aca27ac7bf4022261/packages/ruleset-bundler/src/plugins/__tests__/skypack.spec.ts
# [@stoplight/spectral-ruleset-bundler-v1.0.1](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-ruleset-bundler-v1.0.0...@stoplight/spectral-ruleset-bundler-v1.0.1) (2021-12-10) ### Bug Fixes * **ruleset-bundler:** improve package import heuristics ([#1985](#1985)) ([5c013e9](5c013e9))
🎉 This PR is included in version @stoplight/spectral-ruleset-bundler-v1.0.1 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
As raised on our Discord https://discord.com/channels/841794018173648916/859895506271600670/916069211405705246
Checklist
Does this PR introduce a breaking change?