mv .gitignore. fix indents. update eslint config. use export and global to fix eslint errors

This commit is contained in:
iampeterbanjo
2016-11-15 05:46:35 +00:00
parent fc26dd926d
commit c0f43dcc54
4 changed files with 20 additions and 12 deletions

View File

@@ -1,10 +1,16 @@
{ {
"globals": {"chrome": true}, "globals": {
"browser": true,
"chrome": true
},
"rules": { "rules": {
"no-set-state": "off" "no-set-state": "off"
}, },
"env": { "env": {
"browser": true, "browser": true,
"es6": true "es6": true
} },
"extends": [
"eslint:recommended"
]
} }

View File

@@ -1,3 +1,4 @@
/* exported getUsefulContents */
// we cant use export here // we cant use export here
function getUsefulContents(callback) { function getUsefulContents(callback) {
callback('Hello World'); callback('Hello World');

View File

@@ -1,12 +1,13 @@
// not supported in Firefox /* global getUsefulContents */
// import { getUsefulContents } from "file"; // not supported in Firefox
// import { getUsefulContents } from "file";
function start() { function start() {
getUsefulContents(data => { getUsefulContents(data => {
var display = document.getElementById('display'); var display = document.getElementById('display');
display.innerHTML = data; display.innerHTML = data;
}); });
} }
document.addEventListener('DOMContentLoaded', start); document.addEventListener('DOMContentLoaded', start);