3 Commits

Author SHA1 Message Date
Kent C. Dodds
fb1aa446f5 scripting eslint 2019-11-12 17:30:23 -07:00
Kent C. Dodds
b6add202df eslint extends 2019-11-12 17:22:47 -07:00
Kent C. Dodds
544746d064 eslint: config 2019-11-12 17:22:31 -07:00
4 changed files with 822 additions and 11 deletions

16
.eslintrc Normal file
View File

@@ -0,0 +1,16 @@
{
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": ["eslint:recommended"],
"rules": {
"strict": ["error", "never"]
},
"env": {
"browser": true
}
}

801
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,11 +4,13 @@
"author": "Kent C. Dodds (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"build": "babel src --out-dir dist"
"build": "babel src --out-dir dist",
"lint": "eslint --ignore-path .gitignore ."
},
"devDependencies": {
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1"
"@babel/preset-env": "^7.7.1",
"eslint": "^6.6.0"
}
}

View File

@@ -1,12 +1,10 @@
'use strict'
const username = 'freddy'
typeof username === 'strng'
typeof username === 'string'
if (!'serviceWorker' in navigator) {
if (!('serviceWorker' in navigator)) {
// you have an old browser :-(
}
const greeting = 'hello'
console.log('${greeting} world!')
[1, 2, 3].forEach(x => console.log(x))
console.log(`${greeting} world!`)
;[1, 2, 3].forEach(x => console.log(x))