Settings

Theme

Ask HN: Can someone tell me how to get eslint working properly?

1 points by itsevrgrn 8 years ago · 2 comments · 1 min read


I have watched numerous videos on youtube and I just can't figure this out. Can you tell me how to delete any linters I have made by improperly setting it up and get it working with the airbnb configuration / with prettier on my mac?

fiiv 8 years ago

First, install eslint. Then you probably want to add a plugin to your editor that shows it as you're working in your code. All the popular editors have plugins for this, have a look.

Then you need to set a config for your project, typically through a .eslintrc.js file in the root of your project. There you specify the airbnb config.

Keep in mind, if you do not use JSX you will want the airbnb base config.

  • itsevrgrnOP 8 years ago

    >Then you need to set a config for your project, typically through a .eslintrc.js file in the root of your project.

    This is the part I'm having a hard time with.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection