Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add syntax.json file and fix code to conform

Thanks Syntux!
  • Loading branch information...
commit db04b7829f21abfaf8cf64fd0fd259c352b1fa90 1 parent 1d963ad
@felixge authored
View
6 lib/Sample.js
@@ -5,9 +5,9 @@ function Sample() {
this.count = 0;
}
-Sample.prototype.init = function(){ this.clear(); }
+Sample.prototype.init = function(){ this.clear(); };
Sample.prototype.update = function(val){ this.values.push(val); };
Sample.prototype.clear = function(){ this.values = []; this.count = 0; };
Sample.prototype.size = function(){ return this.values.length;};
-Sample.prototype.print = function(){console.log(this.values);}
-Sample.prototype.getValues = function(){ return this.values; }
+Sample.prototype.print = function(){console.log(this.values);};
+Sample.prototype.getValues = function(){ return this.values; };
View
5 syntax.json
@@ -0,0 +1,5 @@
+{
+ "addSemicolons": true,
+ "trimWhitespace": true,
+ "quotes": "'"
+}
View
2  test/common.js
@@ -1,7 +1,7 @@
var common = exports;
var path = require('path');
-common.dir = {}
+common.dir = {};
common.dir.root = path.dirname(__dirname);
common.dir.lib = path.join(common.dir.root, 'lib');
View
2  test/unit/metrics/test-Meter.js
@@ -27,7 +27,7 @@ test('Meter', {
var json = meter.toJSON();
assert.equal(json['count'], 5);
- assert.equal(json['1MinuteRate'].toFixed(4), '0.0800')
+ assert.equal(json['1MinuteRate'].toFixed(4), '0.0800');
assert.equal(json['5MinuteRate'].toFixed(4), '0.0165');
assert.equal(json['15MinuteRate'].toFixed(4), '0.0055');
View
2  test/unit/util/test-BinaryHeap.js
@@ -132,7 +132,7 @@ test('BinaryHeap', {
return -obj;
}});
- heap.add(8, 7, 6, 5, 4, 3, 2, 1)
+ heap.add(8, 7, 6, 5, 4, 3, 2, 1);
assert.deepEqual(heap.toSortedArray(), [1, 2, 3, 4, 5, 6, 7, 8]);
},
});

3 comments on commit db04b78

@Sannis

What style-checker are you using with such syntax.json?

@felixge
Owner

https://github.com/evilhackerdude/syntux <- kind of stalled right now, but working well for most stuff.

@Sannis

Thanks! Looks like not more powerful that http://veged.github.com/krasota.js/.

Please sign in to comment.
Something went wrong with that request. Please try again.