Javascript: Is there any way I can get an .eslintrc JSON file that contains all the JavaScript Style Guide rules?

Created on 20 Jul 2017  路  2Comments  路  Source: airbnb/javascript

Hi,

I'd like to use the eslint-config-airbnb-base rules in PHPStorm (as default settings for their great auto-formatter). In the newest 2017.2 release they have introduced a feature that allows for .eslintrc rules importing... but from what I can see the importer can't deal with .eslintrc.js files - which is not a big problem, but also it is not able to parse extends - which is a problem.

So we still can't import eslint settings from the eslint-config-airbnb-base module installed with NPM.

So I'm looking for a simple, raw .eslintrc JSON file that contains all the eslint-config-airbnb-base rules. I could import this file with PHPStorm. Is there any place I could find (or generate?) such file?


BTW
Maybe you could get in touch with JetBrains guys and convince them to include the airbnb style guide as one of their code styles presets? At the moment we can choose from "JavaScript Standard Guide", "Google JavaScript Style Guide" and "Drupal JavaScript Guide" (btw, does anyone use it except Drupal core developers?). Airbnb style guide is the second, most popular JS guide, so it's a shame that JetBrains devs didn't include this preset.

question

Most helpful comment

I suppose you could run eslint, and output its config - and then put that in a json file?

Thanks! I didn't know it's possible.

That just seems like a flaw in PHPStorm tho - I'm not sure how to file it, but they'd need to fix it - their blog post suggests filing issues

I've already posted a feature request on their bug tracker: https://youtrack.jetbrains.com/issue/WEB-27900

(Separately, the airbnb config is the first-most popular guide by a number of metrics, not that this is actually important)

Sorry, I didn't want to hurt your feelings, I took Github start as a determinant of popularity :)

All 2 comments

I suppose you could run eslint, and output its config - and then put that in a json file?

That just seems like a flaw in PHPStorm tho - I'm not sure how to file it, but they'd need to fix it - their blog post suggests filing issues here.

(Separately, the airbnb config is the first-most popular guide by a number of metrics, not that this is actually important)

I suppose you could run eslint, and output its config - and then put that in a json file?

Thanks! I didn't know it's possible.

That just seems like a flaw in PHPStorm tho - I'm not sure how to file it, but they'd need to fix it - their blog post suggests filing issues

I've already posted a feature request on their bug tracker: https://youtrack.jetbrains.com/issue/WEB-27900

(Separately, the airbnb config is the first-most popular guide by a number of metrics, not that this is actually important)

Sorry, I didn't want to hurt your feelings, I took Github start as a determinant of popularity :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kozhevnikov picture kozhevnikov  路  3Comments

surfaceowl picture surfaceowl  路  3Comments

golopot picture golopot  路  3Comments

weihongyu12 picture weihongyu12  路  3Comments

danielfttorres picture danielfttorres  路  3Comments