eslint extends

This commit is contained in:
Kent C. Dodds
2019-08-01 14:21:34 -06:00
parent acf0e58463
commit 8fb12ded93
2 changed files with 6 additions and 12 deletions

View File

@@ -6,13 +6,9 @@
"jsx": true
}
},
"extends": ["eslint:recommended"],
"rules": {
"strict": ["error", "never"],
"valid-typeof": "error",
"no-unsafe-negation": "error",
"no-unused-vars": "error",
"no-unexpected-multiline": "error",
"no-undef": "error"
"strict": ["error", "never"]
},
"env": {
"browser": true

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))