jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.96k stars 510 forks source link

How to get jscs to read .jscsrc file from home dir when one is not available in current project #2048

Closed aminnaggar closed 8 years ago

aminnaggar commented 8 years ago

I'm trying to setup a global .jscsrc file to act as a default when projects don't have one and I'm not sure how.

Since I believe jscs will traverse up folders until it finds a .jscsrc I figured if I put it in $HOME it will ultimately hit it, but it doesn't seem to see it. I assume that's because you have a limit as to how many levels it can go up.

Eitherway, I could very well be going about this the wrong way, but the whole point is I'm trying to have a default config

I also noticed there's a presets option but I'm not sure how to add my preset in there if that's the way to go.

markelog commented 8 years ago

It should be working for home dir, we have tests for it, i will verify this.

I also noticed there's a presets option but I'm not sure how to add my preset in there if that's the way to go.

Check this out - https://github.com/jscs-dev/node-jscs/wiki/Creating-a-Custom-Preset-or-Config

markelog commented 8 years ago

It does work from dir, what is your system?