Skip to content
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

Docs: Add instruction re home-directory config files (refs #7729) #9426

Merged
merged 1 commit into from Oct 13, 2017
Merged

Docs: Add instruction re home-directory config files (refs #7729) #9426

merged 1 commit into from Oct 13, 2017

Conversation

jrpool
Copy link
Contributor

@jrpool jrpool commented Oct 13, 2017

Without this, config file in home directory makes 1 test fail.

What is the purpose of this pull request? (put an "X" next to item)

[X] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)
Added instruction to disable any ESLint config file in home directory.

Is there anything you'd like reviewers to focus on?
Check my understanding that ESLint config files in home directory are deprecated (per comments of @platinumazure in issue #7729.

Without this, config file in home directory makes 1 test fail.
@eslintbot
Copy link

LGTM

@platinumazure
Copy link
Member

platinumazure commented Oct 13, 2017 via email

@jrpool
Copy link
Contributor Author

jrpool commented Oct 13, 2017

Thanks for your quick reply, @platinumazure. One of your comments was: “it usually makes more sense to have all of your config files in your project directory. If you rely on a configuration in your home directory and you start sharing a project on GitHub or similar, then part of the linting configuration you've been using won't get to any of your fellow collaborators and your codebase will become inconsistent.”

Another reason for my inference of deprecation is that the tests don’t all pass when the user has a home-directory config file. The failing test is described as if the only prerequisite for its passing is the absence of a config file in /, but, in fact, the test’s passing requires that neither / nor ~/ contain an ESLint config file. The lack of any mention of the latter made me guess that a config file in ~/ is regarded at least as nonstandard.

Even if not deprecated, a config file in ~/ stops a new contributor, like me, from getting through the onboarding instructions without investigating and resolving the failure of one of the tests, so I am submitting this PR as a way to spare future contributors from this detour. I intend to submit another PR to make the texts in messages/no-config-found.txt and tests/bin/eslint.js accurately reflect the set of config files checked for.

If there is a better strategy for dealing with this issue, I welcome advice on that.

@not-an-aardvark
Copy link
Member

In my opinion, we should fix the tests so that they don't require the user to delete files in their home directory. But I'm fine with adding this to the docs in the meantime.

@jrpool
Copy link
Contributor Author

jrpool commented Oct 13, 2017

Thanks, @not-an-aardvark, for that thought. I agree, if ~/eslintrc.* is considered appropriate. I can look into such a fix.

@platinumazure
Copy link
Member

platinumazure commented Oct 13, 2017 via email

@jrpool
Copy link
Contributor Author

jrpool commented Oct 13, 2017

Thanks, @platinumazure. Then there seems to be a consensus that users should be cautioned about possible side effects of ~/eslintrc.*, but tests should not fail because of such a file. So I’ll try to propose a revision of the offending test.

As for my contributing experience, it has been anything but poor. I surveyed dozens of projects before choosing ESLint, and the combination of its clear instructions, its detailed codification of best practices, its enormous test repertoire, and people like you who respond intelligently within minutes to PRs, has completely validated my decision. The puzzle of 1 out of over 17,000 tests failing created a great opportunity to get started pitching in. You couldn’t have planned it better.

@not-an-aardvark not-an-aardvark merged commit f7ed84f into eslint:master Oct 13, 2017
@jrpool jrpool deleted the configdoc branch October 13, 2017 05:04
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 12, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants