Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Add common style guide pre-made rules #54

Closed
SBoudrias opened this issue Oct 9, 2013 · 2 comments · Fixed by #95
Closed

Add common style guide pre-made rules #54

SBoudrias opened this issue Oct 9, 2013 · 2 comments · Fixed by #95

Comments

@SBoudrias
Copy link

Configuration is nice, but having to set this on multiple project or often is a bit tedious.

It'd be super nice if jscs offered a set of predefined rules matching common styles guides like Idiomatic, Google style guide, BSD KNF, etc etc

Then you'd just have to set an option to check using the defined guide. { "style_guide": "idiomatic" }

@paazmaya
Copy link

👍

@jzaefferer
Copy link
Contributor

In esformatter these are called presets. There's currently "default" (match google code js style guide) and "jquery" (matching jQuery style guide, which overlaps a lot of idiomatic.js). You can pick a preset, then override the specific settings you want to be different. That seems like a good route for this project as well.

For a jQuery/idiomatic preset, the configuration in jQuery UI might be a good starting point: https://github.com/jquery/jquery-ui/blob/master/.jscs.json

markelog added a commit to markelog/node-jscs that referenced this issue Dec 15, 2013
* Add "setPreset" method to "string-checker" module, so you can use "preset"
option in browser, right now, only "jquery" preset is supported

* Add new "preset" option to cli module. Without testing right now, since this
module is pretty hard to test

Fix jscs-dev#54
markelog added a commit to markelog/node-jscs that referenced this issue Dec 16, 2013
* Add "setPreset" method to "string-checker" module, so you can use "preset"
option in browser, right now, only "jquery" preset is supported

* Add new "preset" option to cli module. Without testing right now, since this
module is pretty hard to test

Fix jscs-dev#54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants