jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.96k stars 513 forks source link

Airbnb JSCS disagrees with Airbnb ESLint about quotes in JSX components. #2007

Closed nackjicholson closed 8 years ago

nackjicholson commented 8 years ago

I'm using both the airbnb presets for JSCS and ESLint, and they disagree on this point about whether to use a single quote or double quote in jsx.

airbnb JSCS says it wants singles: <Hello text='world'/> airbnb ESLint says it wants doubles: <Hello text="world"/>

They disagree on a few other points, and I can resolve all of them currently with the following. I can fix it by doing this in my jscsConfig of package.json:

{
  "jscsConfig": {
    "preset": "airbnb",
    "esnext": true,
    "requireCurlyBraces": null,
    "requireTrailingComma": null,
    "validateQuoteMarks": { "mark": "'", "escape": true, "ignoreJSX": true }
  }
}

Maybe these should just be turned on by default in the airbnb preset for JSCS. Really curious how ya'll at airbnb writing code that is linted, and jscs'd with your own presets if they disagree.

nackjicholson commented 8 years ago

Thank you @markelog