CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.76k stars 483 forks source link

.csslintrc configuration file only checked in current dir #704

Open jpduckwo opened 7 years ago

jpduckwo commented 7 years ago

I am using csslint with SublimeLinter and finding that css files that do not reside in the same directory as the .csslintrc file are do not use the config. Normally I put .*rc files in the project root and it will apply to all sub directories.

It's the same with command line. I think that other linters also traverse the parent directories to check for the presence of a config file there rather than just the current directory...

e.g. Path

/home/me/dev/project/src/style.css running csslint style.css from /home/me/dev/project/src/ would check for

/home/me/dev/project/src/.csslintrc
/home/me/dev/project/.csslintrc
/home/me/dev/.csslintrc
/home/me/.csslintrc
/home/.csslintrc
/.csslintrc

... until it finds one to use

jpduckwo commented 7 years ago

Htmlhint works this way: https://github.com/yaniswang/HTMLHint/wiki/Usage

config rules

search .htmlhintrc file in current directory and all parent directories:

ghost commented 6 years ago

Is this issue the same as https://github.com/CSSLint/csslint/issues/529? Why has this no reply? Why is this so different from other Sublime linters?