Commit edee73463ec8640d7b05877dfd97977a3ed6b616

Authored by Leonardo Merlin
1 parent fbb93b59

Lint code

gulp/images.js
... ... @@ -10,7 +10,7 @@ var sprity = require('sprity');
10 10 gulp.task('sprites', function () {
11 11 var src = [
12 12 path.join(conf.paths.src, '/assets/images/icons/*.png'),
13   - path.join('!' + conf.paths.src, '/assets/images/icons/sprite.png')
  13 + path.join('!' + conf.paths.src, '/assets/images/icons/sprite.png')
14 14 ];
15 15 var destCss = path.join(conf.paths.tmp, '/serve/app/');
16 16 var destImg = path.join(conf.paths.src, '/assets/images/icons');
... ...
gulp/scripts.js
... ... @@ -13,5 +13,5 @@ gulp.task('scripts', function () {
13 13 .pipe($.jshint())
14 14 .pipe($.jshint.reporter('jshint-stylish'))
15 15 .pipe(browserSync.reload({ stream: true }))
16   - .pipe($.size())
  16 + .pipe($.size());
17 17 });
... ...
gulp/unit-tests.js
... ... @@ -2,7 +2,7 @@
2 2  
3 3 var path = require('path');
4 4 var gulp = require('gulp');
5   -var conf = require('./conf');
  5 +// var conf = require('./conf');
6 6  
7 7 var karma = require('karma');
8 8  
... ...
src/app/components/article-box/article-box.directive.js
... ... @@ -6,7 +6,7 @@
6 6 .directive('articleBox', articleBox);
7 7  
8 8 /** @ngInject */
9   - function articleBox($rootScope) {
  9 + function articleBox() {
10 10  
11 11 /** @ngInject */
12 12 function ArticleBoxController($state, PATH, $log) {
... ...
src/app/components/article-preview/article-preview.directive.js
... ... @@ -6,7 +6,7 @@
6 6 .directive('articlePreview', articlePreview);
7 7  
8 8 /** @ngInject */
9   - function articlePreview($rootScope) {
  9 + function articlePreview() {
10 10  
11 11 /** @ngInject */
12 12 function ArticlePreviewController($state, PATH, $log) {
... ...
src/app/components/article-service/article.service.js
... ... @@ -189,19 +189,19 @@
189 189 });
190 190 }
191 191  
192   - function getSubscribers (event_id, params, cbSuccess, cbError) {
193   - var url = service.apiArticles + event_id + '/followers?_=' + new Date().getTime();
194   - var paramsExtended = angular.extend({
195   - // 'fields[]': ['id', 'slug', 'title', 'abstract', 'body', 'categories', 'created_at', 'start_date', 'end_date', 'hits'],
196   - 'content_type':'Event'
197   - }, params);
198   -
199   - UtilService.get(url, {params: paramsExtended}).then(function(data){
200   - cbSuccess(data.articles);
201   - }).catch(function(error){
202   - cbError(error);
203   - });
204   - }
  192 + // function getSubscribers (event_id, params, cbSuccess, cbError) {
  193 + // var url = service.apiArticles + event_id + '/followers?_=' + new Date().getTime();
  194 + // var paramsExtended = angular.extend({
  195 + // // 'fields[]': ['id', 'slug', 'title', 'abstract', 'body', 'categories', 'created_at', 'start_date', 'end_date', 'hits'],
  196 + // 'content_type':'Event'
  197 + // }, params);
  198 +
  199 + // UtilService.get(url, {params: paramsExtended}).then(function(data){
  200 + // cbSuccess(data.articles);
  201 + // }).catch(function(error){
  202 + // cbError(error);
  203 + // });
  204 + // }
205 205  
206 206 function subscribeToEvent (event_id, params, cbSuccess, cbError) {
207 207  
... ...
src/app/components/auth/auth.service.js
... ... @@ -17,7 +17,7 @@
17 17 var encodedData = '';
18 18 encodedData += 'name=' + data.name;
19 19 encodedData += '&email=' + data.email;
20   - encodedData += '&login=' + data.email.substr(0, data.email.indexOf('@')).toLowerCase().replace(/\W+/g,"").substr(0,25) + "-" + Date.now();
  20 + encodedData += '&login=' + data.email.substr(0, data.email.indexOf('@')).toLowerCase().replace(/\W+/g,'').substr(0,25) + '-' + Date.now();
21 21 encodedData += '&email=' + data.email;
22 22 encodedData += '&password=' + data.password;
23 23 encodedData += '&password_confirmation=' + data.password_confirmation;
... ... @@ -51,10 +51,10 @@
51 51  
52 52 function activate (code) {
53 53 var url = '/api/v1/activate';
54   - var data = {
55   - private_token: API.token,
56   - activation_code: code
57   - };
  54 + // var data = {
  55 + // private_token: API.token,
  56 + // activation_code: code
  57 + // };
58 58 var encodedData = 'private_token=' + API.token;
59 59 encodedData += '&activation_code=' + code;
60 60  
... ... @@ -75,11 +75,11 @@
75 75  
76 76 function changePassword (code, newPassword, newPasswordConfirmation){
77 77 var url = '/api/v1/new_password';
78   - var data = {
79   - code: code,
80   - password: newPassword,
81   - password_confirmation: newPasswordConfirmation
82   - };
  78 + // var data = {
  79 + // code: code,
  80 + // password: newPassword,
  81 + // password_confirmation: newPasswordConfirmation
  82 + // };
83 83 var encodedData = 'code=' + code;
84 84 encodedData += '&password=' + newPassword;
85 85 encodedData += '&password_confirmation=' + newPasswordConfirmation;
... ... @@ -159,21 +159,21 @@
159 159 return (service.isAuthenticated() && authorizedRoles.indexOf(Session.userRole) !== -1);
160 160 }
161 161  
162   - function _encodeObj(obj){
163   - var result = [];
164   - var str = null;
165   - var p = null;
166   -
167   - for (p in obj) {
168   - if (obj.hasOwnProperty(p)) {
169   - // str = encodeURIComponent(p) + '=' + obj[p];
170   - str = p + '=' + obj[p];
171   - result.push(str);
172   - }
173   - }
174   -
175   - return result.join('&');
176   - }
  162 + // function _encodeObj(obj){
  163 + // var result = [];
  164 + // var str = null;
  165 + // var p = null;
  166 +
  167 + // for (p in obj) {
  168 + // if (obj.hasOwnProperty(p)) {
  169 + // // str = encodeURIComponent(p) + '=' + obj[p];
  170 + // str = p + '=' + obj[p];
  171 + // result.push(str);
  172 + // }
  173 + // }
  174 +
  175 + // return result.join('&');
  176 + // }
177 177  
178 178 var service = {
179 179 register: register,
... ...
src/app/components/event-list/event-list.directive.js
... ... @@ -57,9 +57,8 @@
57 57 vm.$log.debug('response', response);
58 58 }, function(error){
59 59 vm.$log.debug('error', error);
60   - })
  60 + });
61 61 }
62   -
63 62 };
64 63  
65 64 var directive = {
... ... @@ -75,6 +74,5 @@
75 74 };
76 75  
77 76 return directive;
78   -
79 77 }
80 78 })();
... ...
src/app/components/guid-service/guid.service.js
... ... @@ -17,7 +17,7 @@
17 17 }
18 18 return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
19 19 s4() + '-' + s4() + s4() + s4();
20   - }
  20 + };
21 21  
22 22 return service;
23 23 }
... ...
src/app/components/proposal-grid/proposal-grid.directive.js
... ... @@ -29,7 +29,7 @@
29 29 }
30 30  
31 31 ProposalGridController.prototype.init = function() {
32   - var vm = this;
  32 + // var vm = this;
33 33 };
34 34  
35 35 ProposalGridController.prototype.attachListeners = function() {
... ...
src/app/pages/auth/auth.controller.js
... ... @@ -153,7 +153,5 @@
153 153 break;
154 154 }
155 155 }, vm.delay * 1000);
156   -
157   - }
158   -
  156 + };
159 157 })();
... ...
src/app/pages/programas/programa.controller.js
... ... @@ -162,12 +162,12 @@
162 162 var el = vm.$element.find(rule);
163 163 el.slideDown();
164 164 angular.element('body').animate({scrollTop: el.offset().top}, 'fast');
165   - }
  165 + };
166 166  
167 167 ProgramaPageController.prototype.findAndHide = function(rule) {
168 168 var vm = this;
169 169 vm.$element.find(rule).slideUp();
170   - }
  170 + };
171 171  
172 172 ProgramaPageController.prototype.sendProposal = function() {
173 173 var vm = this;
... ...