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

Get *.js indentation from .editorconfig file #88

Merged
merged 10 commits into from
Jan 17, 2015
Merged

Conversation

andrewdeandrade
Copy link
Contributor

Fixes: #39

Once this is accepted, I'll cut 0.5.0 (breaking api change since you need an .editorconfig file). Let me know if I should make editorconfig optional. My gut is no since .editorconfig does a lot to help multiple people working on the same project.

cc: @Raynos

@Raynos
Copy link
Contributor

Raynos commented Jan 15, 2015

@malandrew

Semver is not optional. if you make a breaking change you got 1.0.

In fact, the fact that you have any project that is <1.0 is silly, all modules should start at v1 or v2 out of the gate.

If you have some sort of emotional attachment to version "1.0" then forget that. Communicating with your users is always more important.

@@ -1,39 +1,12 @@
'use strict';
var detectIndent = require('detect-indent');
require('array.prototype.find');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont do that please. there is a nice var find = require('find') module.

@Raynos
Copy link
Contributor

Raynos commented Jan 15, 2015

Please ship with a default editorconfig in the rc folder.

@andrewdeandrade
Copy link
Contributor Author

Got it.

Todo:

  • Default .editorconfig or don't require it.
  • Bump to version 1.0.0.
  • use find module instead of Array.prototype.find polyfill

if (parseErr) {
return callback(parseErr);
}
var jsRules = parsed.find(function getJsRuleSet(ruleset) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just do [].filter() or [].some() i think...

@andrewdeandrade
Copy link
Contributor Author

@Raynos

Let me know if this is okay now.

@andrewdeandrade
Copy link
Contributor Author

@andrewdeandrade
Copy link
Contributor Author

Resolving #76

@Raynos
Copy link
Contributor

Raynos commented Jan 17, 2015

lgtm.

andrewdeandrade pushed a commit that referenced this pull request Jan 17, 2015
@andrewdeandrade andrewdeandrade merged commit 374a0cd into master Jan 17, 2015
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 this pull request may close these issues.

smarter way to resolve indentation of current project
3 participants