sasstools / sass-lint

Pure Node.js Sass linting
MIT License
1.77k stars 532 forks source link

Use cosmiconfig for configuration discovery #645

Open thasmo opened 8 years ago

thasmo commented 8 years ago

It would be awesome if sass-lint used cosmiconfig for configuration discovery.

A short summary of what it does:

Find and load a configuration object from
- a package.json property (anywhere down the file tree)
- a JSON or YAML "rc file" (anywhere down the file tree)
- a .config.js CommonJS module (anywhere down the file tree)
- a CLI --config argument

It supports rc files with optional file-type extension, e.g. .sasslintrc.yml or .sasslintrc.json and, as mentioned, it can also read configuration from the package.json file - an option which gains more and more interest lately.

And:

Additionally, all of these search locations are configurable: you can customize filenames or turn off any location.

DanPurdy commented 8 years ago

Thanks @thasmo we'll take a look at it

thasmo commented 8 years ago

PostCSS announced it is going to introduce a common PostCSS config using cosmiconfig.

DanPurdy commented 8 years ago

I plan on looking at this for our 1.9 release, 1.8 should hopefully be landing soon, just a few PR's to get merged in. 1.9 will hopefully be all about supporting other config formats and a more robust ability to extend configs above the existing config-file option we've improved for 1.8.

👍

romulof commented 7 years ago

Any news about this feature?

I'd love to ditch that yaml file and migrate my config into package.json.