> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# js-yaml-unsafe-schema

> A resolved js-yaml loader enables JavaScript-specific YAML constructors.

## What it flags

Reviews js-yaml calls when the source compiler's existing module resolution identifies the installed package version. The rule recognizes v3 default full loading, explicit v3 full schemas, and a v4 default schema extended with the js-yaml-js-types aggregate. v4 data-only defaults stay quiet. When js-yaml is not installed, or its version cannot be established, calls are judged as v4: only the explicit `DEFAULT_SCHEMA.extend(...)` schema with the js-yaml-js-types aggregate reports, since that API exists only in v4. Calls also stay quiet when the loader binding or effective options cannot be established. This includes options with a custom prototype and no own schema. [js-yaml migration notes](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md#400---2021-01-03)

Review where the source data comes from and use a schema limited to the necessary data types at untrusted boundaries. The finding is contextual and report-only.

Use the default JavaScript engine or `--engine js` for this rule. The native engine does not expose the package version metadata it needs.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{ "rules": { "js-yaml-unsafe-schema": "off" } }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.