Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
Add .jshintrc and bring project into compliance.
Browse files Browse the repository at this point in the history
Remove global module variable to better align with style guide.
  • Loading branch information
Splaktar committed Mar 29, 2015
1 parent fc60286 commit ee4b414
Show file tree
Hide file tree
Showing 21 changed files with 124 additions and 34 deletions.
73 changes: 73 additions & 0 deletions .jshintrc
@@ -0,0 +1,73 @@
{
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"es3": false,
"forin": true,
"freeze": true,
"immed": true,
"indent": 4,
"latedef": "nofunc",
"newcap": false,
"noarg": true,
"noempty": true,
"nonbsp": true,
"nonew": true,
"plusplus": false,
"quotmark": "single",
"undef": true,
"unused": false,
"strict": false,
"maxparams": 10,
"maxdepth": 5,
"maxstatements": 40,
"maxcomplexity": 16,
"maxlen": 120,
"asi": false,
"boss": false,
"debug": false,
"eqnull": true,
"esnext": true,
"evil": false,
"expr": false,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": true,
"maxerr": 500,
"moz": false,
"multistr": false,
"notypeof": false,
"proto": false,
"scripturl": false,
"shadow": false,
"sub": true,
"supernew": false,
"validthis": false,
"noyield": false,
"devel": true,
"browser": true,
"node": true,
"globals": {
"angular": false,
"inject": false,
"gapi": false,
"$": false,
"moment": false,
"protractor": false,
"module": false,
"require": false,
"browser": false,
"element": false,
"by": false,
"describe": false,
"expect": false,
"beforeEach": false,
"afterEach": false,
"it": false
}
}
3 changes: 2 additions & 1 deletion app/about/about.js
@@ -1,4 +1,5 @@
boomerang.controller('AboutController', function ($http, $sce, Config, NavService) {
angular.module('gdgXBoomerang')
.controller('AboutController', function ($http, $sce, Config, NavService) {
var vm = this;
vm.loading = true;
NavService.setNavTab(0);
Expand Down
3 changes: 2 additions & 1 deletion app/boomerang.config.js
@@ -1,4 +1,5 @@
boomerang.config(function ($routeProvider, $locationProvider, $mdThemingProvider) {
angular.module('gdgXBoomerang')
.config(function ($routeProvider, $locationProvider, $mdThemingProvider) {

$locationProvider.hashPrefix('!');

Expand Down
5 changes: 2 additions & 3 deletions app/boomerang.module.js
@@ -1,6 +1,5 @@
var boomerang = angular.module('gdgXBoomerang', ['ngRoute', 'ngSanitize', 'ngAria', 'ngAnimate', 'ngMaterial']);

boomerang.controller('MainController', function ($rootScope, Config, NavService) {
angular.module('gdgXBoomerang', ['ngRoute', 'ngSanitize', 'ngAria', 'ngAnimate', 'ngMaterial'])
.controller('MainController', function ($rootScope, Config, NavService) {
var mc = this;
mc.chapterName = Config.name;
mc.googlePlusLink = 'https://plus.google.com/' + Config.id;
Expand Down
2 changes: 1 addition & 1 deletion app/events/events.js
@@ -1,4 +1,4 @@
boomerang.controller('EventsController', function ($http, $log, $filter, Config, NavService) {
angular.module('gdgXBoomerang').controller('EventsController', function ($http, $log, $filter, Config, NavService) {
var vm = this;
NavService.setNavTab(2);
vm.chapterName = Config.name;
Expand Down
2 changes: 1 addition & 1 deletion app/filters/hashLinkyFilter.js
@@ -1,5 +1,5 @@
// Google+ hashtag linky from http://plnkr.co/edit/IEpLfZ8gO2B9mJcTKuWY?p=preview
boomerang.filter('hashLinky', function() {
angular.module('gdgXBoomerang').filter('hashLinky', function() {
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var linkifiedDOM = document.createElement('div');
Expand Down
2 changes: 1 addition & 1 deletion app/filters/htmlLinkyFilter.js
@@ -1,5 +1,5 @@
// HTML-ified linky from http://plnkr.co/edit/IEpLfZ8gO2B9mJcTKuWY?p=preview
boomerang.filter('htmlLinky', function($filter) {
angular.module('gdgXBoomerang').filter('htmlLinky', function($filter) {
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var linkifiedDOM = document.createElement('div');
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusAlbum.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusAlbum', function () {
angular.module('gdgXBoomerang')
.directive('gplusAlbum', function () {
return {
scope: {
article: '=',
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusArticle.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusArticle', function () {
angular.module('gdgXBoomerang')
.directive('gplusArticle', function () {
return {
scope: {
article: '=',
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusEvent.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusEvent', function () {
angular.module('gdgXBoomerang')
.directive('gplusEvent', function () {
return {
scope: { article: '=' },
templateUrl: '/app/news/components/gplusEvent.html'
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusNoAttachments.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusNoAttachments', function () {
angular.module('gdgXBoomerang')
.directive('gplusNoAttachments', function () {
return {
scope: { article: '=' },
templateUrl: '/app/news/components/gplusNoAttachments.html'
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusPhotoVideo.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusPhotoVideo', function () {
angular.module('gdgXBoomerang')
.directive('gplusPhotoVideo', function () {
return {
scope: {
article: '=',
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusPostContent.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusPostContent', function () {
angular.module('gdgXBoomerang')
.directive('gplusPostContent', function () {
return {
transclude: true,
templateUrl: '/app/news/components/gplusPostContent.html'
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusPostImage.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusPostImage', function () {
angular.module('gdgXBoomerang')
.directive('gplusPostImage', function () {
return {
templateUrl: '/app/news/components/gplusPostImage.html'
};
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/gplusPostVideo.js
@@ -1,4 +1,5 @@
boomerang.directive('gplusPostVideo', function ($sce) {
angular.module('gdgXBoomerang')
.directive('gplusPostVideo', function ($sce) {
return {
link: function (scope, element) {
scope.videoUrl = $sce.trustAsResourceUrl(scope.attachment.embed.url);
Expand Down
3 changes: 2 additions & 1 deletion app/news/components/newsItemFooter.js
@@ -1,4 +1,5 @@
boomerang.directive('newsItemFooter', function () {
angular.module('gdgXBoomerang')
.directive('newsItemFooter', function () {
return {
templateUrl: '/app/news/components/newsItemFooter.html'
};
Expand Down
3 changes: 2 additions & 1 deletion app/news/news.js
@@ -1,4 +1,5 @@
boomerang.controller('NewsController', function ($http, $timeout, $filter, $log, $sce, Config, NavService) {
angular.module('gdgXBoomerang')
.controller('NewsController', function ($http, $timeout, $filter, $log, $sce, Config, NavService) {
var vm = this;
NavService.setNavTab(1);
vm.loading = true;
Expand Down
26 changes: 15 additions & 11 deletions app/photos/photos.js
@@ -1,4 +1,5 @@
boomerang.controller('PhotosController', function ($http, Config, NavService) {
angular.module('gdgXBoomerang')
.controller('PhotosController', function ($http, Config, NavService) {
var vm = this;
vm.loading = true;
NavService.setNavTab(3);
Expand All @@ -11,19 +12,22 @@ boomerang.controller('PhotosController', function ($http, Config, NavService) {

$http.jsonp(pwa).
success(function (data) {
var p = data.feed.entry;
for (var x in p) {
var photo = {
link: p[x].link[1].href,
src: p[x].content.src,
alt: p[x].title.$t,
title: p[x].summary.$t
};
vm.photos.push(photo);
var photoList = data.feed.entry;
var i;
if (photoList) {
for (i = 0; i < photoList.length; i++) {
var photo = {
link: photoList[i].link[1].href,
src: photoList[i].content.src,
alt: photoList[i].title.$t,
title: photoList[i].summary.$t
};
vm.photos.push(photo);
}
}
vm.loading = false;
})
.error(function (data) {
.error(function () {
vm.errorMsg = 'Sorry, we failed to retrieve the Photos from the Picasa Web Albums API. ' +
'Logging out of your Google Account and logging back in may resolve this issue.';
vm.loading = false;
Expand Down
5 changes: 3 additions & 2 deletions app/services/configService.js
@@ -1,9 +1,10 @@
boomerang.factory('Config', function () {
angular.module('gdgXBoomerang')
.factory('Config', function () {
return {
// TODO Modify these to configure your app
'name' : 'GDG Space Coast',
'id' : '103959793061819610212',
'googleApi' : '<insert your API key here>',
'googleApi' : 'AIzaSyA9ALjr2iWvhf3Rsz9-bH0cEcDcrdkpuAg',
'pwaId' : '5915725140705884785', // Picasa Web Album id, must belong to Google+ id above
'domain' : 'http://www.gdgspacecoast.org',
'twitter' : 'gdgspacecoast',
Expand Down
3 changes: 2 additions & 1 deletion app/services/navService.js
@@ -1,4 +1,5 @@
boomerang.factory('NavService', function () {
angular.module('gdgXBoomerang')
.factory('NavService', function () {
var navTab = '0';
var navListener;

Expand Down
4 changes: 2 additions & 2 deletions test/unit/karma.conf.js
Expand Up @@ -42,8 +42,8 @@ module.exports = function (config) {
// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
// Level of logging. Possible values:
// config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
Expand Down

0 comments on commit ee4b414

Please sign in to comment.