csslint icon indicating copy to clipboard operation
csslint copied to clipboard

.csslintrc configuration file only checked in current dir

Open jpduckwo opened this issue 6 years ago • 2 comments

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 avatar Jul 25 '17 04:07 jpduckwo

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

config rules

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

jpduckwo avatar Jul 25 '17 04:07 jpduckwo

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?

ghost avatar Mar 12 '18 20:03 ghost