Skip to content

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.

config.yml
name: my-project
version: 1.0.0

This rule is not configurable.

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.

Made with ❤️‍🔥 around the world by the Flint team and contributors.