Javascript: How set Airbnb Javascript code styling in my Intellij IDEA project

Created on 11 Sep 2017  路  9Comments  路  Source: airbnb/javascript

Does anybody know how to setup the Airbnb Javascript code styling in a Intellij IDEA project? I keep finding guides only for Webstorm.

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

https://i.stack.imgur.com/xYsqp.png

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

https://i.stack.imgur.com/TDNQf.png

I literally have no idea how I am supposed to add it to my project.

question

Most helpful comment

All 9 comments

Configure it for eslint, and use eslint-configure-airbnb or eslint-config-airbnb-base?

Hey @vagg777 the truth is that nobody has made an Intellij code style XML with Airbnb styles, at least not that I know. If you happen to find that config file do two things: 1. Share it with me; 2. Go to Settings -> Editor -> Code Style -> Javascript, there you will see a dropdown with the word scheme on the left. Next to it there are three dots with a menu that lets you import said code style XML. After importing it you will be able to press Option + Command + L and Webstorm automatically will enforce Airbnb rules.

Would be nice, but apparently no one has done it so far. Eventually someone will do it :)

following

@matejthetree you can do that by clicking "subscribe" on the right; you don't need to ping everyone involved in the thread with a comment.

I think we can go to WebStorm official vote, let WebStorm officially support this feature.

https://youtrack.jetbrains.com/issue/WEB-27521

In Intellij, open .eslintrc and right click -> Apply ESLint Code Style Rules

image

Was this page helpful?
0 / 5 - 0 ratings