
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
jsonld-lint
Advanced tools
This package contains the core JSON-LD lint engine written in typescript its primary dependencies are
The following defines the different types of syntax errors the processing engine detects, if a syntax error is encountered subsequent processing of the document terminates.
Rule - jsonld-lint/unexpected-json-value-type
A result of this type will be returned when an unexpected value type for a JSON-LD keyword is encountered.
Example - Invalid as the expected JSON value types for @context are string, array or object.
{
"@context": false
}
Rule - jsonld-lint/unexpected-json-value
A result of this type will be returned when an unexpected value for a JSON-LD keyword is encountered.
Example - Invalid as the expected values for @version are 1, 1.0 and 1.1.
{
"@version": 25
}
Rule - jsonld-lint/unexpected-use-of-jsonld-keyword
A result of this type will be returned when a JSON-LD keyword is used in an unexpected way.
Example - Invalid as @base is not valid inside a node object only in a local context definition.
{
"@base": "https://example.com"
}
Rule - jsonld-lint/duplicate-json-key
A result of this type will be return when an object/map within a JSON-LD document is encountered that features duplicate property keys, which is illegal in JSON-LD.
Example - Invalid as the test
property key is repeated.
{
"test": true,
"test": false
}
Rule - jsonld-lint/duplicate-alias-jsonld-keyword
A result of this type will be return when an object/map within a JSON-LD document has the aliased equivalent properties both featured in the same JSON object.
Example - Invalid as id
is an alias of the JSON-LD keyword @id
.
{
"id": "test-id",
"@id": "test-id"
}
Rule - jsonld-lint/invalid-jsonld-keyword-as-term-value
A result of this type will be returned when a JSON value type of string is encountered where the value matches a JSON-LD keyword being used in an invalid manner.
Example - Invalid when a JSON property has a string value of @context
because it is a JSON-LD keyword, @type
is the only
JSON-LD keyword allowed.
{
"property": "@context"
}
The following defines the different types of linting results the processing engine detects.
Rule - jsonld-lint/unrecognized-jsonld-keyword
JSON-LD keywords use the common pattern of featuring the @
as a prefix, to ensure preservation of the namespace
and allow future versions of JSON-LD to define new terms, developers are encourage to not feature JSON properties where
the key is prefixed with an @
symbol and it is not defined by JSON-LD.
Example - The JSON key of @this-is-a-test
matches the convention of being a JSON-LD term but is not a JSON-LD term.
{
"@this-is-a-test": true
}
Rule - jsonld-lint/unmapped-term
A result of this type will be returned when expansion of a term fails. This is usually due to the term not being documented in the documents context.
Example - The term undefinedTerm
is not defined in the documents context, hence will be reported as an
un-mapped term.
{
"@context": {
"definedTerm": "https://example.com/definedTerm"
},
"definedTerm": "good",
"undefinedTerm": "bad"
}
Rule - jsonld-lint/empty-json-property-key
A result of this type will be returned when a JSON property key is encountered which is an empty string
Example - The JSON object contains an empty string as the key for one of the JSON properties
{
"@context": {},
"": false
}
FAQs
JSON-LD Linter
The npm package jsonld-lint receives a total of 5 weekly downloads. As such, jsonld-lint popularity was classified as not popular.
We found that jsonld-lint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.