An ESLint plugin that provides linting for YAML files (`.yaml`, `.yml`). Current stable version is 1.1.3, released March 2025. It uses an ESLint-based YAML parser (not js-yaml) since v1.1.0, enabling integration with ESLint's rule system. Supports both ESLint 9 flat config (ESM/CJS) and legacy ESLint 8 configs. Ships TypeScript types. Differentiators: first-class ESLint compatibility with YAML-specific rules, support for multiple YAML documents, and active maintenance with recent dependency updates.
npm install eslint-plugin-yamlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use eslint-plugin-yaml with ESLint 9 flat config, importing the plugin and applying its recommended config plus custom rules.
Review rule configurations; update custom parser settings if any.
Use ESLint 9+ and migrate to eslint.config.js/flat config.
Use Node >=12.
Migrate to flat config with pluginYaml.configs.recommended.
Use .default for CommonJS, or use ESM import.
Run npm install eslint-plugin-yaml --save-dev.
Ensure only one version is installed and remove duplicate overrides.
Use require('eslint-plugin-yaml').default instead of require('eslint-plugin-yaml').Use flat config with pluginYaml.configs.recommended.