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: Clarify that -c configs merge with .eslintrc.* (fixes #9535) #9847

Merged
merged 2 commits into from Jan 17, 2018

Conversation

@platinumazure
Copy link
Member

@platinumazure platinumazure commented Jan 15, 2018

Users must use --no-eslintrc to prevent .eslintrc.* files from being used

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:

See #9535.

What changes did you make? (Give an overview)

  • Switched the order of --no-eslintrc and -c options in CLI help
  • Clarified that -c will merge with .eslintrc.* if --no-eslintrc is not specified, in the following places:
    • CLI help
    • docs/user-guide/command-line-interface (both the --help output sample as well as in the more detailed description for -c)
    • docs/user-guide/configuring
    • docs/developer-guide/nodejs-api (CLIEngine constructor documentation)

Is there anything you'd like reviewers to focus on?

I tried to keep the notes as brief as possible while (hopefully) getting the point across. Please let me know if they can be improved.

I intentionally made some changes to suggest that ESLint conventionally favors .eslintrc.* files, to help emphasize that the .eslintrc.* logic needs to be turned off for single configuration file cases. As it is now, it's easy for a user to see -c first on the list of CLI options and assume that's all they need to do to configure ESLint with their one file. In my view, -c is actually a supplemental configuration option, which may or may not be combined with the primary .eslintrc.* configuration files by using or not using --no-eslintrc. Let me know if this doesn't reflect how we see configuration files in this project.

Users must use --no-eslintrc to prevent `.eslintrc.*` files from being used
Copy link
Member

@not-an-aardvark not-an-aardvark left a comment

LGTM, thanks!

@@ -45,37 +47,44 @@ Specifying rules and plugins:
Fixing problems:
--fix Automatically fix problems
--fix-dry-run Automatically fix problems without saving the changes to the file system
--fix-dry-run Automatically fix problems without saving the
changes to the file system
Copy link
Member

@not-an-aardvark not-an-aardvark Jan 15, 2018

Were these whitespace changes intentional?

Copy link
Member Author

@platinumazure platinumazure Jan 15, 2018

No, I think they happened due to me running --help on a narrow terminal window. I can certainly fix these for our docs, if desired, since web browsers could horizontally scroll if needed. Thoughts?

Copy link
Member Author

@platinumazure platinumazure Jan 15, 2018

I figured it out. Last time I ran --help and piped directly into a file, so no TTY and no max-width TTY display. This time, I was using the Node runtime in a TTY. I'll push another commit to fix this.

@platinumazure platinumazure merged commit 8ccbdda into master Jan 17, 2018
5 checks passed
@platinumazure platinumazure deleted the config-option branch Jan 17, 2018
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jul 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants