Compare commits
24 Commits
step-1
...
tjs/step-0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e88f4ba7af | ||
|
|
650e66fe3f | ||
|
|
544df8b178 | ||
|
|
4fa1a97129 | ||
|
|
fbb81df6c9 | ||
|
|
fb1aa446f5 | ||
|
|
b6add202df | ||
|
|
544746d064 | ||
|
|
d0c1fa44e4 | ||
|
|
cd5939daf8 | ||
|
|
cc722afcb2 | ||
|
|
571fc946b8 | ||
|
|
898876d0d2 | ||
|
|
9c51bd92fa | ||
|
|
f10cfb98ce | ||
|
|
860492ad3f | ||
|
|
4e579627b7 | ||
|
|
053c5de689 | ||
|
|
d43c846d12 | ||
|
|
437ed30ddb | ||
|
|
94216f47e8 | ||
|
|
4f2fde56e2 | ||
|
|
c077931399 | ||
|
|
82342de51c |
12
.babelrc
Normal file
12
.babelrc
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"node": "10"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
16
.eslintrc
Normal file
16
.eslintrc
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2019,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
"extends": ["eslint:recommended", "eslint-config-prettier"],
|
||||
"rules": {
|
||||
"strict": ["error", "never"]
|
||||
},
|
||||
"env": {
|
||||
"browser": true
|
||||
}
|
||||
}
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
node_modules
|
||||
dist
|
||||
|
||||
17
.prettierrc
Normal file
17
.prettierrc
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"bracketSpacing": false,
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"insertPragma": false,
|
||||
"jsxBracketSameLine": false,
|
||||
"jsxSingleQuote": false,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "always",
|
||||
"quoteProps": "as-needed",
|
||||
"requirePragma": false,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "all",
|
||||
"useTabs": false
|
||||
}
|
||||
4053
package-lock.json
generated
4053
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@@ -1,11 +1,22 @@
|
||||
{
|
||||
"name": "static-testing-tools",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
|
||||
"license": "MIT",
|
||||
"devDependencies": {}
|
||||
"private": true,
|
||||
"author": "Kent C. Dodds (http://kentcdodds.com/)",
|
||||
"license": "GPLv3",
|
||||
"scripts": {
|
||||
"build": "babel src --out-dir dist",
|
||||
"lint": "eslint --ignore-path .gitignore .",
|
||||
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json)\"",
|
||||
"format": "npm run prettier -- --write",
|
||||
"check-format": "npm run prettier -- --list-different",
|
||||
"validate": "npm run check-format && npm run lint && npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.7.0",
|
||||
"@babel/core": "^7.7.2",
|
||||
"@babel/preset-env": "^7.7.1",
|
||||
"eslint": "^6.6.0",
|
||||
"eslint-config-prettier": "^6.5.0",
|
||||
"prettier": "^1.19.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
const name = 'Freddy'
|
||||
typeof name === 'strng'
|
||||
const username = 'freddy'
|
||||
typeof username === 'string'
|
||||
|
||||
if (!'serviceWorker' in navigator) {
|
||||
if (!('serviceWorker' in navigator)) {
|
||||
// you have an old browser :-(
|
||||
}
|
||||
|
||||
const greeting = 'hello'
|
||||
console.log('${greting} world!')
|
||||
|
||||
[(1, 2, 3)].forEach(x => console.log(x))
|
||||
console.log(`${greeting} world!`)
|
||||
;[1, 2, 3].forEach(x => console.log(x))
|
||||
|
||||
14
src/typescript-example.js
Normal file
14
src/typescript-example.js
Normal file
@@ -0,0 +1,14 @@
|
||||
function add(a, b) {
|
||||
return a + b
|
||||
}
|
||||
|
||||
function getFullName(user) {
|
||||
const {
|
||||
name: {first, middle, last},
|
||||
} = user
|
||||
return [first, middle, last].filter(Boolean).join('')
|
||||
}
|
||||
|
||||
add(1, 'two')
|
||||
|
||||
getFullName({name: {first: 'Joe', midd1e: 'Bud', last: 'Matthews'}})
|
||||
Reference in New Issue
Block a user