From b09cb228f70cdaeb08e502f2864cb499316f5274 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 17 Feb 2016 16:46:32 -0800 Subject: [PATCH] Disallow trailing whitespace // FREEBIE --- .jscsrc | 5 +++-- Gruntfile.js | 14 +++++++++++++- test/models/messages_test.js | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.jscsrc b/.jscsrc index c91d6125..689d7b05 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,3 +1,4 @@ { - "disallowMixedSpacesAndTabs": true -} \ No newline at end of file + "disallowMixedSpacesAndTabs": true, + "disallowTrailingWhitespace": true +} diff --git a/Gruntfile.js b/Gruntfile.js index 19794b7c..029784c3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -134,7 +134,15 @@ module.exports = function(grunt) { }, jscs: { all: { - src: ['js/**/*.js', '!js/libtextsecure.js', '!js/libaxolotl-worker.js', '!js/components.js', 'test/**/*.js'] + src: [ + 'Gruntfile', + 'js/**/*.js', + '!js/libtextsecure.js', + '!js/libaxolotl-worker.js', + '!js/components.js', + 'test/**/*.js', + '!test/blanket_mocha.js', + ] } }, watch: { @@ -142,6 +150,10 @@ module.exports = function(grunt) { files: ['<%= jshint.files %>', './js/**/*.js'], tasks: ['jshint'] }, + style: { + files: ['<%= jscs.all.src %>', './js/**/*.js'], + tasks: ['jscs'] + }, sass: { files: ['./stylesheets/*.scss'], tasks: ['sass'] diff --git a/test/models/messages_test.js b/test/models/messages_test.js index a8b50428..42df82cd 100644 --- a/test/models/messages_test.js +++ b/test/models/messages_test.js @@ -87,7 +87,7 @@ message = messages.add({type: 'incoming'}); assert.ok(message.isIncoming()); }); - + it('checks if is outgoing message', function() { var messages = new Whisper.MessageCollection(); var message = messages.add(attributes);