2
votes

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

2
Welcome to StackOverflow. Please read and follow the posting guidelines: what kinds of questions can I ask stackoverflow.com/help/on-topic, and How to ask: stackoverflow.com/help/how-to-ask. Remember to also to include Minimal, complete, verifiable examples: stackoverflow.com/help/mcve. Then, click edit to edit your question so that we may help. - SherylHohman

2 Answers

3
votes

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.

0
votes

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