adrienverge / yamllint

A linter for YAML files.
GNU General Public License v3.0
2.79k stars 265 forks source link

feat: use editorconfig values if present #505

Open twelvelabs opened 1 year ago

twelvelabs commented 1 year ago

I'd love to have yamllint use EditorConfig for config defaults. Specifically:

Currently I have to duplicate (and remember to keep in sync) those values in both .editorconfig and .yamllint.yaml.

Would you be open to a PR that adds editorconfig-core-py and uses .editorconfig for defaults if present?

adrienverge commented 1 year ago

Hello,

In theory yamllint could try to read config files from many tools, e.g. Coala, MegaLinter, Prettier (.prettierrc), .vimrc, etc. and EditorConfig. I agree it would be a nice-to-have addition for some users, however like for many nice-to-have add-ons, it would be a burden for the project (especially if it requires adding a dependency), so I'd rather avoid maintaining it inside this repo.

Why about writing a small helper script that would generate a yamllint config file from a .editorconfig file?

hholst80 commented 5 months ago

EditorConfig is becoming sufficiently omnipresent to support in itself.