3 Commits

Author SHA1 Message Date
Kent C. Dodds
4f2fde56e2 config prettier 2018-09-14 21:49:32 -06:00
Kent C. Dodds
c077931399 prettier! 2018-09-14 21:49:31 -06:00
Kent C. Dodds
82342de51c install, config, run 2018-09-14 21:49:25 -06:00
6 changed files with 1078 additions and 7 deletions

12
.eslintrc Normal file
View File

@@ -0,0 +1,12 @@
{
"parserOptions": {
"ecmaVersion": "2018"
},
"extends": ["eslint:recommended"],
"rules": {
"no-console": "off"
},
"env": {
"browser": true
}
}

7
.prettierignore Normal file
View File

@@ -0,0 +1,7 @@
node_modules
coverage
dist
build
.build
# etc...

12
.prettierrc Normal file
View File

@@ -0,0 +1,12 @@
{
"arrowParens": "avoid",
"bracketSpacing": false,
"jsxBracketSameLine": false,
"printWidth": 80,
"proseWrap": "always",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}

1036
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,9 +3,15 @@
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": {}, "scripts": {
"lint": "eslint src",
"format": "prettier --write \"**/*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx)\""
},
"keywords": [], "keywords": [],
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)", "author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "MIT", "license": "MIT",
"devDependencies": {} "devDependencies": {
"eslint": "^5.5.0",
"prettier": "^1.14.2"
}
} }

View File

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