javascriptintellij-ideaairbnb-js-styleguide

Intellij IDEA - How to set Airbnb code styling in my project


I am trying to implement the Airbnb code styling in my project and I have not yet understood how I am supposed to add it in my project.

I tried Settings -> Languages and Frameworks -> Javascript, but the Javascript language list does not contain Airbnb style.

enter image description here

Then I tried to go to Setting -> Editor -> Code Style -> Javascript, but again I see no option for Airbnb styling.

enter image description here

How can I add the Airbnb styling in my project?


Solution

  • i'm using the webstorm from the inteliJ family of IDEs. so i hope your settings are similar.

    First go to language and Frameworks / javascript / code quality tools / eslint. or simply search for eslint. There you have to add where your eslint package is. npm install eslint in your project or globally. and add the path from your eslint install folder in the node_modules folder.

    then you have to add the abnbs config file. npm intsall eslint-config-airbnb similar and add the path to the linters/.eslintrc file from the installed folder. i hope this helps you