-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Configuration Cascading and Hierarchy #110
Comments
Hi @slindberg, We should support this functionality already: we use cascading, directory-specific ESLint configuration in some of our own internal repositories (for similar reasons to what you mentioned), and it's been working. If you're finding your configurations are not being respected, can you please provide the full content of your |
I'm running the analysis on codeclimate.com. I'm attempting to use eslint@2 via the
(The "directory-specific config files" part was in response to another question about specifying multiple different .eslintrc files for subdirectories, to work around cascading not working.) I've tried a lot of different permutations of |
Thanks for the response. Sorry for any confusion between my response and your support conversation. We do not support any kind of cascading configuration with |
Ah, got it, that does clear it up. After your initial response, I tried a couple more things, and I think what was going on is that the eslint parser settings that allow for es6 module syntax were only in the eslintrc override, not in the base eslintrc in the root directory, and those settings weren't being cascaded, but rules were (although this seems to work fine locally). That was a confusing sentence, but hopefully it made sense. Thanks again! |
Glad you got it working! Sorry for any confusion we caused along the way. |
This is behavior is described in the eslint documentation.
My particular use case is a rails app that has a large amount of vanilla/jQuery JavaScript, that is being migrated to es6/JSX. The two different code styles/syntaxes are isolated from each other in sub directories, and for various reasons we cannot make them separate repos (yet). Configuration cascading works perfectly to define a separate set of rules for each type.
A more common use case however, is altering a small set of rules from the base config for a test suite. For example, eslint config for es6/JSX app test suite is basically the same as for the app, but globals for mocha must be whitelisted (
describe
,it
, etc.),no-unused-expressions
turned off for chai assertions, laxerquotes
to avoid mixed single and double quotes in test descriptions, etc. Configuration cascading is the answer to this problem, and is truly essential to using eslint effectively IMHO.The text was updated successfully, but these errors were encountered: