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

eslint config references airbnb-base which was not in package.json's devDepencies #3

Open
barelyknown opened this issue Jul 3, 2020 · 2 comments

Comments

@barelyknown
Copy link

By default, the installed .eslintrc.js references airbnb-base which isn't included.

I also noticed the "Installing airbnb config..." message when running the install script (which I assume is unintentional).

@atej
Copy link
Owner

atej commented Jul 4, 2020

Hi,

Thanks for checking the script out!

If you selected "Yes" for the prompt ''Do you want to setup eslint+prettier?", you should see the following 6 packages added as devDependencies in package.json (versions may vary):

"devDependencies" : {
  ...
  "eslint-config-airbnb-base": "^14.1.0",
  "eslint-config-prettier": "^6.11.0",
  "eslint-import-resolver-ember": "0.0.1",
  "eslint-plugin-import": "^2.22.0",
  "eslint-plugin-prettier": "^3.1.4",
  "prettier": "^2.0.5",
  ...
}

The .eslintrc.js will thus extend like so:

{
  ...
  extends: [
    'airbnb-base',
    'eslint:recommended',
    'plugin:ember/recommended',
    'prettier',
  ],
  ...
}

None of the above changes should be observable if you selected "No" for the aforementioned prompt.

Also, if you're using yarn as your package manager, you may get an additional prompt before eslint-config-airbnb-base installation actually begins (right after the "Installing airbnb config..." message); something of the form - It seems as if you are using Yarn. Would you like to use Yarn for the installation? (y/n), to which you should answer yes.

Hope this helps.

@barelyknown
Copy link
Author

Ah, OK. Thanks.

For what it's worth, I did choose "Yes" for all of the relevant choices. I'm using Yarn but I didn't receive an additional prompt and a few of the devDependencies weren't in package.json. I didn't look into why, but that's where my confusion was coming from.

Thanks!

@barelyknown barelyknown changed the title eslint config references airbnb-base eslint config references airbnb-base which was not in package.json's devDepencies Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants