some progress made

This commit is contained in:
Kent C. Dodds
2019-07-31 17:10:32 -06:00
parent 898876d0d2
commit 571fc946b8
23 changed files with 1194 additions and 83 deletions

View File

@@ -4,7 +4,7 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"lint": "eslint src",
"lint": "eslint .",
"format": "prettier --write \"**/*.+(js|json|ts|tsx|md)\""
},
"devDependencies": {

View File

@@ -4,7 +4,7 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"lint": "eslint src",
"lint": "eslint .",
"format": "prettier --write \"**/*.+(js|json|ts|tsx|md)\""
},
"devDependencies": {

View File

@@ -4,7 +4,7 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"lint": "eslint src",
"lint": "eslint .",
"format": "prettier --write \"**/*.+(js|json|ts|tsx|md)\""
},
"devDependencies": {

View File

@@ -4,7 +4,7 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"lint": "eslint src",
"lint": "eslint .",
"format": "npm run prettier -- --write",
"prettier": "prettier \"**/*.+(js|json|ts|tsx|md)\"",
"validate": "npm run lint && npm run prettier -- --list-different"

View File

@@ -1,13 +0,0 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2019
},
"extends": ["eslint:recommended", "eslint-config-prettier"],
"rules": {
"no-console": "off"
},
"env": {
"browser": true
}
}

View File

@@ -1,11 +0,0 @@
[ignore]
[include]
[libs]
[lints]
[options]
[strict]

View File

@@ -0,0 +1,20 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2019
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"eslint-config-prettier",
"eslint-config-prettier/@typescript-eslint"
],
"rules": {
"no-console": "off"
},
"env": {
"browser": true
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -4,17 +4,18 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"lint": "eslint src",
"flow": "flow",
"lint": "eslint --ext .js,.ts,.tsx .",
"check-types": "tsc",
"format": "npm run prettier -- --write",
"prettier": "prettier \"**/*.+(js|json|ts|tsx|md)\"",
"validate": "npm run lint && npm run prettier -- --list-different && npm run flow"
"validate": "npm run lint && npm run prettier -- --list-different && check-types"
},
"devDependencies": {
"babel-eslint": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"flow-bin": "^0.81.0",
"prettier": "^1.18.2"
"prettier": "^1.18.2",
"typescript": "^3.5.3"
}
}

View File

@@ -1,14 +1,16 @@
// @flow
const username = 'freddy'
typeof username === 'string'
function add(a: number, b: number): number {
return a + b
}
type User = {
name: {
first: string,
middle: string,
last: string,
},
first: string
middle: string
last: string
}
}
function getFullName(user: User): string {
const {

View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
// because we're compiling with Babel instead of TypeScript
// and we're only using TypeScript for type checking, we'll set "noEmit"
// to true so running type checking doesn't generate any files.
"noEmit": true
},
"include": ["src"]
}

View File

@@ -1,11 +0,0 @@
[ignore]
[include]
[libs]
[lints]
[options]
[strict]

View File

@@ -4,19 +4,19 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"lint": "eslint src",
"flow": "flow",
"lint": "eslint .",
"check-types": "tsc",
"format": "npm run prettier -- --write",
"prettier": "prettier \"**/*.+(js|json|ts|tsx|md)\"",
"validate": "npm run lint && npm run prettier -- --list-different && npm run flow",
"validate": "npm run lint && npm run prettier -- --list-different && check-types",
"precommit": "npm run validate"
},
"devDependencies": {
"babel-eslint": "^9.0.0",
"babel-eslint": "11.0.0-beta.0",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"flow-bin": "^0.81.0",
"husky": "^3.0.2",
"prettier": "^1.18.2"
"prettier": "^1.18.2",
"typescript": "^3.5.3"
}
}

View File

@@ -1,14 +1,13 @@
// @flow
function add(a: number, b: number): number {
return a + b
}
type User = {
name: {
first: string,
middle: string,
last: string,
},
first: string
middle: string
last: string
}
}
function getFullName(user: User): string {
const {

View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
// because we're compiling with Babel instead of TypeScript
// and we're only using TypeScript for type checking, we'll set "noEmit"
// to true so running type checking doesn't generate any files.
"noEmit": true
},
"include": ["src"]
}

View File

@@ -1,11 +0,0 @@
[ignore]
[include]
[libs]
[lints]
[options]
[strict]

View File

@@ -4,24 +4,24 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "GPLv3",
"scripts": {
"lint": "eslint src",
"flow": "flow",
"lint": "eslint .",
"check-types": "tsc",
"format": "npm run prettier -- --write",
"prettier": "prettier \"**/*.+(js|json|ts|tsx|md)\"",
"validate": "npm run lint && npm run prettier -- --list-different && npm run flow"
"validate": "npm run lint && npm run prettier -- --list-different && check-types"
},
"devDependencies": {
"babel-eslint": "^10.0.2",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"flow-bin": "^0.81.0",
"husky": "^3.0.2",
"lint-staged": "^9.2.1",
"prettier": "^1.18.2"
"prettier": "^1.18.2",
"typescript": "^3.5.3"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm run flow"
"pre-commit": "lint-staged && check-types"
}
}
}

View File

@@ -1,14 +1,13 @@
// @flow
function add(a: number, b: number): number {
return a + b
}
type User = {
name: {
first: string,
middle: string,
last: string,
},
first: string
middle: string
last: string
}
}
function getFullName(user: User): string {
const {

View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
// because we're compiling with Babel instead of TypeScript
// and we're only using TypeScript for type checking, we'll set "noEmit"
// to true so running type checking doesn't generate any files.
"noEmit": true
},
"include": ["src"]
}