Skip to content

Commit da9b47e

Browse files
committed
Merge pull request #173 from rdio/dev/run.format
Run jsfmt on source code
2 parents 9fef923 + e8a1ab1 commit da9b47e

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

examples/styleGuide.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,25 @@
105105
return;
106106
}
107107

108-
var nestedObjects = [{
108+
var arrayOfObjects = [{
109109
a: true
110110
}, {
111111
a: false
112112
}];
113113

114+
var nestedObjects = {
115+
one: {
116+
fish: {
117+
two: 'fish'
118+
}
119+
},
120+
red: {
121+
fish: {
122+
blue: 'fish'
123+
}
124+
}
125+
};
126+
114127
}).call(this);
115128

116129
(function() {

lib/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ if (paths.length > 0) {
236236
var chunk = process.stdin.read();
237237
if (chunk !== null) {
238238
js += chunk;
239-
} else if (chunk === null && js === ''){
239+
} else if (chunk === null && js === '') {
240240
console.log(doc);
241241
process.exit(-1);
242242
}

tests/search.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ describe('jsfmt.search', function() {
1111
it('should test basic searching', function() {
1212
var results = jsfmt.search('var param1 = 1, done = function(){}; _.each(param1, done);', '_.each(a, b);');
1313
results[0].node.loc.should.eql({
14-
start: {line: 1, column: 37},
15-
end: {line: 1, column: 57}
14+
start: {
15+
line: 1,
16+
column: 37
17+
},
18+
end: {
19+
line: 1,
20+
column: 57
21+
}
1622
});
1723
results[0].wildcards.a.name.should.eql('param1');
1824
results[0].wildcards.b.name.should.eql('done');

0 commit comments

Comments
 (0)