Skip to content

Commit

Permalink
Update eslint config
Browse files Browse the repository at this point in the history
Kinda using Pluff as a testing playground for eslint rules...
  • Loading branch information
SpaceK33z committed May 8, 2016
1 parent 27a7595 commit bc0d81d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
1 change: 0 additions & 1 deletion app/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import ngAnimate from 'angular-animate';
import ngTouch from 'angular-touch';
import 'angucomplete-alt';
import satellizer from 'satellizer';
import 'angucomplete-alt';
import ngLoadingBar from 'angular-loading-bar';
import ngDialog from 'ng-dialog';
import 'angular-translate-cookie';
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function ($scope, apiService, $timeout, $location, lessonService)
});

$scope.isActive = function (viewLocation) {
const regexp = new RegExp('(\/search\/.*)');
const regexp = new RegExp('(/search/.*)');
if (regexp.test($location.path())) {
return viewLocation === '/';
}
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/timetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export default function ($scope, $http, lessonService, $window, $location, $inte
}

function fetchTimetable(date) {
return apiService.getTimeTable(timetableInfo.url, date).then((payload) => (
return apiService.getTimeTable(timetableInfo.url, date).then((payload) =>
parseTimetable(timetableInfo.kind, payload.data)
), failedTimetable);
, failedTimetable);
}

fetchTimetable(weekService.now());
Expand Down
12 changes: 9 additions & 3 deletions app/services/day.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ export default function (weekService) {
{ number: 14, duration: 90 },
];
// Fontys starts at 8.45
const dayStartTime = now.clone().hour(8).minute(45).second(0);
const dayStartTime = now.clone()
.hour(8)
.minute(45)
.second(0);
// And ends at 21.30
const dayEndTime = now.clone().hour(21).minute(30).second(0);
const dayEndTime = now.clone()
.hour(21)
.minute(30)
.second(0);

return {
getHourBreaks() {
Expand Down Expand Up @@ -69,7 +75,7 @@ export default function (weekService) {

if (dayEndTime > now && dayStartTime < now) {
const percentageComplete = (now - dayStartTime) / (dayEndTime - dayStartTime) * 100;
const percentageRounded = (Math.round(percentageComplete * 100) / 100);
const percentageRounded = Math.round(percentageComplete * 100) / 100;

return `${percentageRounded}%`;
}
Expand Down
2 changes: 1 addition & 1 deletion app/services/lesson.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function () {

// Select the current hour and push the new lesson to it
// Array keys are zero based, and skipping the first key results in a hell
week[(startDaynumber - 1)][(hourNumber - 1)].lessons.push(lessonData);
week[startDaynumber - 1][hourNumber - 1].lessons.push(lessonData);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion app/services/lesson/emptyWeek.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function () {

for (let hour = 0; hour < 14; hour++) {
week[day][hour] = {
number: (hour + 1),
number: hour + 1,
lessons: [],
};
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"babel-loader": "6.2.4",
"css-loader": "^0.23.1",
"dotenv": "^2.0.0",
"eslint": "^2.6.0",
"eslint-config-codeyellow": "0.2.3",
"eslint": "^2.9.0",
"eslint-config-codeyellow": "0.3.0",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"html-webpack-plugin": "2.15.0",
Expand Down

0 comments on commit bc0d81d

Please sign in to comment.