Skip to content

Commit

Permalink
increase linter strictness
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenschobert committed Sep 6, 2020
1 parent 88c6987 commit 1f7a85b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/.jshintrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
{
"esversion": 5,
"strict": true,
"undef": true,
"unused": true,
"eqeqeq": true,
"browser": true,
"devel": true,
"globals": {
"define": true,
"exports": true,
"module": true
}
}
8 changes: 6 additions & 2 deletions src/instafeed.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(function exportInstafeed(root, factory) {
"use strict";

if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
Expand All @@ -7,6 +9,8 @@
root.Instafeed = factory();
}
}(this, function defineInstafeed() {
"use strict";

function assert(val, msg) {
if (!val) {
throw new Error(msg);
Expand Down Expand Up @@ -398,11 +402,11 @@

apiRequest = new XMLHttpRequest();

apiRequest.ontimeout = function apiRequestTimedOut(event) {
apiRequest.ontimeout = function apiRequestTimedOut() {
callbackOnce(new Error('api request timed out'));
};

apiRequest.onerror = function apiRequestOnError(event) {
apiRequest.onerror = function apiRequestOnError() {
callbackOnce(new Error('api connection error'));
};

Expand Down

0 comments on commit 1f7a85b

Please sign in to comment.