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": {
"no-set-state": "off"
},
"env": {
"browser": true,
"es6": true
}
},
"extends": [
"eslint:recommended"
]
}

View File

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

View File

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