fileExtensions
Enforces consistent YAML file extensions.
✅ This rule is included in the yaml stylisticStrict presets.
YAML files can generally be given either the .yml or .yaml file extension.
Both are supported by almost all tooling.
Choosing one file extension consistently helps keep a repository consistent and avoids confusing.
The .yaml extension is recommended by the YAML specification.
Therefore, this rule defaults to reporting on YAML files with the .yml extension.
Examples
Section titled “Examples”name: my-projectversion: 1.0.0name: my-projectversion: 1.0.0Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”If your project or organization has an established convention of using .yml extensions, you may not need this rule.
Some ecosystems or tools may prefer or require .yml extensions.
You might consider using configuration file disables for those specific situations instead of completely disabling this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
yml/file-extension
Made with ❤️🔥 around the world by
the Flint team and contributors.