Skip to content

Commit

Permalink
Chore: rearrange init options. (#10131)
Browse files Browse the repository at this point in the history
* Chore:  rearrange init options.

put "Use a popular style guide" to be 1st, because users are more likely to use it.

* Update config-initializer.js

* chore: put standard style guide ahead.

* Chore: add style guide link
  • Loading branch information
aladdin-add authored and not-an-aardvark committed Apr 13, 2018
1 parent f595fd8 commit 7f69f11
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/config/config-initializer.js
Expand Up @@ -394,16 +394,20 @@ function promptUser() {
message: "How would you like to configure ESLint?",
default: "prompt",
choices: [
{ name: "Answer questions about your style", value: "prompt" },
{ name: "Use a popular style guide", value: "guide" },
{ name: "Answer questions about your style", value: "prompt" },
{ name: "Inspect your JavaScript file(s)", value: "auto" }
]
},
{
type: "list",
name: "styleguide",
message: "Which style guide do you want to follow?",
choices: [{ name: "Google", value: "google" }, { name: "Airbnb", value: "airbnb" }, { name: "Standard", value: "standard" }],
choices: [
{ name: "Airbnb (https://github.com/airbnb/javascript)", value: "airbnb" },
{ name: "Standard (https://github.com/standard/standard)", value: "standard" },
{ name: "Google (https://github.com/google/eslint-config-google)", value: "google" }
],
when(answers) {
answers.packageJsonExists = npmUtil.checkPackageJson();
return answers.source === "guide" && answers.packageJsonExists;
Expand Down

0 comments on commit 7f69f11

Please sign in to comment.