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

Please consider adding #43

Open
hanakin opened this issue Sep 9, 2016 · 3 comments
Open

Please consider adding #43

hanakin opened this issue Sep 9, 2016 · 3 comments

Comments

@hanakin
Copy link

hanakin commented Sep 9, 2016

Hey guys love the package my only issue with these standards (which are great by the way), and the one rule i feel should be configurable is the spacing of indent this should always be an option.

This is a global programming concern as we often mix various languages often, some of which require 2 spaces and some of which require 4 spaces, others hat require hard tabs.

since there is a format for 2 spaces and hard tabs I made a version with 4 space soft tabs to meet this need.

https://github.com/hanakin/sane-format
https://github.com/hanakin/js-sane-standard

please consider adding it to the package thks

@stephenkubovic
Copy link
Contributor

Thanks the feedback @hanakin.

I feel like this may be adding support for too many deviations from the actual standard format. We originally added support for semi-standard and happiness format because the existing linter package supported these options. In retrospect this may have been a bad idea, as it opens up the possibility to support an unlimited number of flavours of standard (which is kind of the opposite of what standard tries to achieve). Supporting a variety of formatters, in my opinion, should be left to installing multiple Atom packages or creating a general purpose/customizable formatting package – something other than standard-formatter.

@hanakin
Copy link
Author

hanakin commented Sep 14, 2016

hmm thats the thing though or rather the fools errand of standard. its a novile idea but the two things that very in any of these is semi colons and spacing. why? because it varies in other languages. 1. semi-colons is a weird one and outside of standard I have never heard of not using them and doubt it will catch on, especially since lots of languages use them. 2. spacing is dictated by project more than anything else it depends on what other languages you couple it with. the only reason that 2 spaces ever caught on in the first place was because of saas being a ruby project and ruby is strictly 2 spaced.... However if you ever work with other languages in your projects such as php, .net, java, etc... they also have their own standards for spacing. Not to mention HTML is 4 spaced tabs.... In fact I think 4 spaced tabs is the more universal as outside of ruby I can not really think of another language that is 2 spaced of the top of my head.

Maybe a better way to handle this is to just allow an override for those two settings? This way you would need none of the others...

@kyeotic
Copy link

kyeotic commented Feb 28, 2017

@hanakin "the fools errand of standard" is literally one of the selling points

No decisions to make. No .eslintrc, .jshintrc, or .jscsrc files to manage. It just works.

This module saves you (and others!) time in two ways:

No configuration. The easiest way to enforce consistent style in your project. Just drop it in.
Catch style errors before they're submitted in PRs. Saves precious code review time by eliminating back-and-forth between maintainer and contributor.

I think you should look for another solution if you disagree with the very heart of the project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants