diff --git a/.lintstagedrc b/.lintstagedrc index e69de29..5e96f90 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -0,0 +1,9 @@ +{ + "linters": { + "*.js": [ + "eslint", + "prettier --write", + "git add" + ] + } +} \ No newline at end of file diff --git a/package.json b/package.json index b015784..253d6f6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "lint": "eslint src", + "flow": "flow", + "precommit": "lint-staged" }, "keywords": [], "author": "Kent C. Dodds (http://kentcdodds.com/)", diff --git a/src/eslint.js b/src/eslint.js index bcdb91b..24ceb47 100644 --- a/src/eslint.js +++ b/src/eslint.js @@ -6,7 +6,6 @@ if (!'serviceWorker' in navigator) { } const greeting = 'hello' -console - .log('${greting} world!') +console.log('${greting} world!') - [(1, 2, 3)].forEach(x => console.log(x)) +[(1, 2, 3)].forEach(x => console.log(x))