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

Add facebook preset to jscs #2284

Closed AlexJuarez closed 8 years ago

AlexJuarez commented 8 years ago

Here is the facebook jscs linting config.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 96.666% when pulling a9642443d370cd51d68089cd16b73e59afb3adca on AlexJuarez:facebookPreset into b419c66b593474b906e29cfd3ac44ad938391fec on jscs-dev:master.

markelog commented 8 years ago

Pretty sure facebook doesn't have public javascript code style, regardless, this is not implemented right and we are not adding new features at this time.

See https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2, http://eslint.org/blog/2016/04/welcoming-jscs-to-eslint

bgw commented 8 years ago

I'm not encouraging this commit, but for completeness,

facebook doesn't have public javascript code style

isn't entirely true. We publish an eslint config, but we don't necessarily advocate that others use it. That configuration is used by many open source FB projects, like react.

markelog commented 8 years ago

I meant formal document for it, like https://google.github.io/styleguide/javascriptguide.xml https://github.com/airbnb/javascript

since linters are not yet at the point when everything could be defined through config.

Also i don't see it used, like: https://github.com/reactjs/react-router/blob/master/.eslintrc https://github.com/facebook/react/blob/master/.eslintrc.js (redefines it quite a lot) https://github.com/reactjs/redux/blob/master/.eslintrc

are very different