Skip to content

Commit

Permalink
chore: add .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Feb 14, 2016
1 parent 1cc5b75 commit 6433128
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
"travis-after-all": "^1.4.4",
"validate-commit-msg": "^2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require('fs').readFile('./package.json', 'utf8', function (error, contents) {
}
var parsed = JSON.parse(contents);
assert.deepEqual(typeof sortPackageJson(parsed), 'object', 'Accepts object, returns object');
assert.equal(JSON.stringify(sortPackageJson(parsed), null, 2), contents, 'Returned object is sorted');
assert.equal(JSON.stringify(sortPackageJson(parsed), null, 2) + '\n', contents, 'Returned object is sorted');
assert.equal(sortPackageJson(contents), contents, 'Accepts string, returns sorted string');

assert.equal(JSON.stringify(sortPackageJson({
Expand Down

0 comments on commit 6433128

Please sign in to comment.