-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding linter and fixing IE11 / external override bugs.
- Loading branch information
1 parent
47be99e
commit 4b0c3aa
Showing
6 changed files
with
458 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"extends": ["important-stuff"], | ||
"plugins": ["es5"], | ||
"parser": "@babel/eslint-parser", | ||
"rules": { | ||
"es5/no-es6-methods": "error", | ||
"es5/no-es6-static-methods": "error", | ||
"es5/no-binary-and-octal-literals": "error", | ||
"es5/no-classes": "off", | ||
"es5/no-for-of": "off", | ||
"es5/no-generators": "error", | ||
"es5/no-object-super": "error", | ||
"es5/no-typeof-symbol": "error", | ||
"es5/no-unicode-code-point-escape": "error", | ||
"es5/no-unicode-regex": "error", | ||
"es5/no-computed-properties": "off", | ||
"es5/no-destructuring": "off", | ||
"es5/no-default-parameters": "off", | ||
"es5/no-spread": "off", | ||
"es5/no-modules": "off", | ||
"es5/no-exponentiation-operator": "off", | ||
"es5/no-block-scoping": "off", | ||
"es5/no-arrow-functions": "off", | ||
"es5/no-shorthand-properties": "off", | ||
"es5/no-rest-parameters": "off", | ||
"es5/no-template-literals": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export function includes(obj, item) { | ||
if (Array.isArray(obj)) { | ||
for (let i = 0; i < obj.length; i++) { | ||
if (obj[i] === item) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} else if (typeof obj === "string") { | ||
return obj.indexOf(item) >= 0; | ||
} else { | ||
throw Error(`Can't call includes on ${typeof obj}`); | ||
} | ||
} |
Oops, something went wrong.