-
Notifications
You must be signed in to change notification settings - Fork 23
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
Error with extending ruleset from an NPM package #214
Comments
any updates on this? |
I'm seeing the same issue. It seems like it is not looking into the |
There is a hack to make it work @exoszajzbuk you can just point the the path to your dep. for example we have a extends:
- "node_modules/@bastion-technologies/spectral-ruleset/dist/ruleset.js" in the Note that it also works with the cli in case you also use it in your CIs for example. |
Hello everyone, just opened a pull request that can fix this problem, #218 . |
I have a similar issue, but when applying non-ruleset node packages in my custom scripts.
Is there any workaround for that? |
I have the same issue. Does #218 fix this? |
Can #218 be merged to fix this issue? |
Hi folks, Although #218 was closed, the latest spectral packages have been included in v1.1.4 of the extension (which now also supports linting of AsyncAPI v3 and Arazzo v1). In my quick test for this issue, the following base configuration works as I can get feedback on OWASP rules via the extension:
|
@frankkilcommins it still only works for me if i change your sample to:
But that also required me to install it manually: If i just try your sample as-is, the Spectral output shows:
Some more tests: These works:
This doesn't:
So it also seems to depend per package implementation. |
The following error occurs when defining
.spectral.js
in a project repo which would extend a ruleset from a private NPM package (in this case@team-supercharge/oasg/ruleset
)The extension seems to be trying to load the dependency from a CDN, previous versions (using Spectral 5) used to correctly trying to load the
@team-supercharge/oasg/ruleset
locally from thenode_modules
directory.When using a YAML ruleset
.spectral.yaml
the following error occurs:In this case the extension tries to load the ruleset from the project folder, instead of from inside
node_modules
.In both cases running Spectral from the CLI works totally fine.
Environment:
The text was updated successfully, but these errors were encountered: