Introduction
eslint-plugin-yml is ESLint plugin provides linting rules for YAML.
📛 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">
.
Requirementsvue-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.
👫 Related Packages
- eslint-plugin-jsonc ... ESLint plugin for JSON, JSON with comments (JSONC) and JSON5.
- eslint-plugin-toml ... ESLint plugin for TOML.
- eslint-plugin-json-schema-validator ... ESLint plugin that validates data using JSON Schema Validator.
- jsonc-eslint-parser ... JSON, JSONC and JSON5 parser for use with ESLint plugins.
- yaml-eslint-parser ... YAML parser for use with ESLint plugins.
- toml-eslint-parser ... TOML parser for use with ESLint plugins.
🔒 License
See the LICENSE file for license rights and limitations (MIT).