3

How can I configure Airbnb's Style Guide in Prettier? I'm using VS Code. Thanks in advance!

Jiovan Melendez
  • 719
  • 1
  • 6
  • 8
  • 1
    Welcome to StackOverflow. Please read and follow the posting guidelines: what kinds of questions can I ask https://stackoverflow.com/help/on-topic, and How to ask: https://stackoverflow.com/help/how-to-ask. Remember to also to include Minimal, complete, verifiable examples: https://stackoverflow.com/help/mcve. Then, click `edit` to edit your question so that we may help. – SherylHohman Aug 14 '17 at 21:38

2 Answers2

4

eslint-config-prettier will disable all rule on formatting. It mentions eslint-config-airbnb several times in the Readme file, but they didn't guarantee that it 100% follow airbnb rules.

I guess the if you want to make sure they work fine together, you have to check the rules yourself.

Update:

I have check the source file of eslint-config-prettier. Here is the list of rules can be override:

// The following rules can be used in some cases. See the README for more
// information. (These are marked with `0` instead of `"off"` so that a
// script can distinguish them.)

curly: 0,
"max-len": 0,
"no-confusing-arrow": 0,
"no-mixed-operators": 0,
"no-tabs": 0,
quotes: 0,

According to their comment, other format rules should never be used with Prettier.

shriek
  • 5,605
  • 8
  • 46
  • 75
J.Wang
  • 61
  • 5
0

You could use eslint-config-prettier to extends a Prettier config.

ranieribt
  • 1,280
  • 1
  • 15
  • 33