stylelint / stylelint

A mighty CSS linter that helps you avoid errors and enforce conventions.
https://stylelint.io
MIT License
11.06k stars 935 forks source link

Shareable Configs similar to ESLint? #1972

Closed klebba closed 8 years ago

klebba commented 8 years ago

This may be a feature request, or perhaps I'm missing something... I'm trying to distribute my rule set across projects. In ESLint, this is done through Shareable Configs which may be globally installed (npm install -g eslint-config-my-rules)

http://eslint.org/docs/developer-guide/shareable-configs

Can this be achieved with Stylelint? It seems like I need to specifically install local copies of my stylelint rules in every project which will use them. This isn't the case with ESLint, which allows developers to globally install our team's rule set and run them in every project.

m-allanson commented 8 years ago

See http://stylelint.io/user-guide/configuration/#extends and https://github.com/search?utf8=%E2%9C%93&q=stylelint-config-

m-allanson commented 8 years ago

@klebba I think I misread your issue - you want to install a config globally and then reference it from several different projects on the same machine? I don't think stylelint supports that at the moment, if it's something you'd like to see could you create a new issue using the issue template?

klebba commented 8 years ago

@m-allanson Sure -- yes I'm hoping to distribute Stylelint rules the same way that we distribute ESLint rules, so if this is currently impossible I will open a new ticket

davidtheclark commented 8 years ago

@klebba You should be able to put a .stylelintrc in a directory that is parent to those projects you want to use it, and the child directories should find it.