Skip to content

Introduction

eslint-plugin-yml is ESLint plugin provides linting rules for YAML.

NPM licenseNPM versionNPM downloadsNPM downloadsNPM downloadsNPM downloadsNPM downloadsBuild StatusCoverage Status

📛 Features

This ESLint plugin provides linting rules for YAML.

  • You can use ESLint to lint YAML.
  • You can find out the problem with your YAML files.
  • You can apply consistent code styles to your YAML files.
  • Supports Vue SFC custom blocks such as <i18n lang="yaml">.
    Requirements vue-eslint-parser v7.3.0 and above.
  • Supports ESLint directives. e.g. # eslint-disable-next-line
  • You can check your code in real-time using the ESLint editor integrations.

You can check on the Online DEMO.

❓ How is it different from other YAML plugins?

Plugins that do not use AST

e.g. eslint-plugin-yaml

These plugins use the processor to parse and return the results independently, without providing the ESLint engine with AST and source code text.

Plugins don't provide AST, so you can't use directive comments (e.g. # eslint-disable).
Plugins don't provide source code text, so you can't use it with plugins and rules that use text (e.g. eslint-plugin-prettier, eol-last).

eslint-plugin-yml works by providing AST and source code text to ESLint.

📖 Usage

See User Guide.

✅ Rules

See Available Rules.

🚀 To Do More Verification

Verify using JSON Schema

You can verify using JSON Schema by checking and installing eslint-plugin-json-schema-validator.

Verify the Vue I18n message resource files

You can verify the message files by checking and installing @intlify/eslint-plugin-vue-i18n.

🔒 License

See the LICENSE file for license rights and limitations (MIT).