remove things
This commit is contained in:
14
.eslintrc
14
.eslintrc
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"parser": "babel-eslint",
|
|
||||||
"rules": {
|
|
||||||
"valid-typeof": "error",
|
|
||||||
"no-negated-in-lhs": "error",
|
|
||||||
"no-unused-vars": "error",
|
|
||||||
"no-template-curly-in-string": "error",
|
|
||||||
"no-undef": "error",
|
|
||||||
"no-unexpected-multiline": "error"
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"browser": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
11
.flowconfig
11
.flowconfig
@@ -1,11 +0,0 @@
|
|||||||
[ignore]
|
|
||||||
|
|
||||||
[include]
|
|
||||||
|
|
||||||
[libs]
|
|
||||||
|
|
||||||
[lints]
|
|
||||||
|
|
||||||
[options]
|
|
||||||
|
|
||||||
[strict]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"linters": {
|
|
||||||
"*.js": [
|
|
||||||
"eslint",
|
|
||||||
"prettier --write",
|
|
||||||
"git add"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
12
.prettierrc
12
.prettierrc
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"arrowParens": "avoid",
|
|
||||||
"bracketSpacing": false,
|
|
||||||
"jsxBracketSameLine": false,
|
|
||||||
"printWidth": 80,
|
|
||||||
"proseWrap": "always",
|
|
||||||
"semi": false,
|
|
||||||
"singleQuote": true,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"trailingComma": "all",
|
|
||||||
"useTabs": false
|
|
||||||
}
|
|
||||||
2983
package-lock.json
generated
2983
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -3,21 +3,9 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {},
|
||||||
"lint": "eslint src",
|
|
||||||
"flow": "flow",
|
|
||||||
"precommit": "lint-staged && flow"
|
|
||||||
},
|
|
||||||
"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": {}
|
||||||
"babel-eslint": "^9.0.0",
|
|
||||||
"eslint": "^5.5.0",
|
|
||||||
"eslint-config-prettier": "^3.0.1",
|
|
||||||
"flow-bin": "^0.80.0",
|
|
||||||
"husky": "^0.14.3",
|
|
||||||
"lint-staged": "^7.2.2",
|
|
||||||
"prettier": "^1.14.2"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
27
src/flow.js
27
src/flow.js
@@ -1,27 +0,0 @@
|
|||||||
// @flow
|
|
||||||
|
|
||||||
function add(a: number, b: number): number {
|
|
||||||
return a + b
|
|
||||||
}
|
|
||||||
|
|
||||||
type User = {
|
|
||||||
name: {
|
|
||||||
first: string,
|
|
||||||
middle: string,
|
|
||||||
last: string,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
function getFullName(user: User): string {
|
|
||||||
const {
|
|
||||||
name: {first, middle, last},
|
|
||||||
} = user
|
|
||||||
return [first, middle, last].filter(Boolean).join('')
|
|
||||||
}
|
|
||||||
|
|
||||||
add(1, 2)
|
|
||||||
const one = '1'
|
|
||||||
add(one, 2)
|
|
||||||
|
|
||||||
getFullName({name: {first: 'Joe', middle: 'Bud', last: 'Matthews'}})
|
|
||||||
getFullName({name: {first: 'Joe', middle: false, last: 'Matthews'}})
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
const user = {
|
|
||||||
name: {first: 'Joe', middle: 'Bud', last: 'Matthews'},
|
|
||||||
age: 25,
|
|
||||||
birthday: 'October 18th, 1988',
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(user)
|
|
||||||
Reference in New Issue
Block a user