Compare commits
12 Commits
tjs/step-1
...
tjs/step-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
281993d1ca | ||
|
|
a1e30ee995 | ||
|
|
cc6fdf9d84 | ||
|
|
a5d2d971dd | ||
|
|
b41c948eeb | ||
|
|
a8d752b04f | ||
|
|
dda36098bd | ||
|
|
945eaac136 | ||
|
|
df642497e9 | ||
|
|
8fb12ded93 | ||
|
|
acf0e58463 | ||
|
|
c204cda937 |
3
.babelrc
3
.babelrc
@@ -7,7 +7,6 @@
|
|||||||
"node": "10"
|
"node": "10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"@babel/preset-typescript"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
28
.eslintrc
28
.eslintrc
@@ -1,31 +1,25 @@
|
|||||||
{
|
{
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2019,
|
"ecmaVersion": 2019,
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
"jsx": true
|
"jsx": true
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"extends": ["eslint:recommended", "eslint-config-prettier"],
|
"project": "./tsconfig.json"
|
||||||
|
},
|
||||||
|
"plugins": ["@typescript-eslint/eslint-plugin"],
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"eslint-config-prettier",
|
||||||
|
"eslint-config-prettier/@typescript-eslint"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"strict": ["error", "never"]
|
"strict": ["error", "never"]
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true
|
"browser": true
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": "**/*.+(ts|tsx)",
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"project": "./tsconfig.json"
|
|
||||||
},
|
|
||||||
"plugins": ["@typescript-eslint/eslint-plugin"],
|
|
||||||
"extends": [
|
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"eslint-config-prettier/@typescript-eslint"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
2
.huskyrc
2
.huskyrc
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "npm run validate"
|
"pre-commit": "npm run check-types && lint-staged"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
.lintstagedrc
Normal file
9
.lintstagedrc
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"*.js": [
|
||||||
|
"eslint"
|
||||||
|
],
|
||||||
|
"*.+(js|json|ts)": [
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
|
}
|
||||||
2317
package-lock.json
generated
2317
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
@@ -4,25 +4,26 @@
|
|||||||
"author": "Kent C. Dodds (http://kentcdodds.com/)",
|
"author": "Kent C. Dodds (http://kentcdodds.com/)",
|
||||||
"license": "GPLv3",
|
"license": "GPLv3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "babel src --extensions .js,.ts,.tsx --out-dir dist",
|
"build": "babel src --out-dir dist",
|
||||||
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
|
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
|
||||||
"check-types": "tsc",
|
"check-types": "tsc",
|
||||||
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json|ts|tsx)\"",
|
"prettier": "prettier --ignore-path .gitignore --write \"**/*.+(js|json)\"",
|
||||||
"format": "npm run prettier -- --write",
|
"format": "npm run prettier -- --write",
|
||||||
"check-format": "npm run prettier -- --list-different",
|
"check-format": "npm run prettier -- --list-different",
|
||||||
"validate": "npm run check-types && npm run check-format && npm run lint && npm run build"
|
"validate": "npm-run-all --parallel check-types check-format lint build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.7.0",
|
"@babel/cli": "^7.5.5",
|
||||||
"@babel/core": "^7.7.2",
|
"@babel/core": "^7.5.5",
|
||||||
"@babel/preset-env": "^7.7.1",
|
"@babel/preset-env": "^7.5.5",
|
||||||
"@babel/preset-typescript": "^7.7.2",
|
"@typescript-eslint/eslint-plugin": "^2.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.7.0",
|
"@typescript-eslint/parser": "^2.0.0",
|
||||||
"@typescript-eslint/parser": "^2.7.0",
|
"eslint": "^6.1.0",
|
||||||
"eslint": "^6.6.0",
|
"eslint-config-prettier": "^6.0.0",
|
||||||
"eslint-config-prettier": "^6.5.0",
|
"husky": "^3.0.2",
|
||||||
"husky": "^3.0.9",
|
"lint-staged": "^9.2.1",
|
||||||
"prettier": "^1.19.1",
|
"npm-run-all": "^4.1.5",
|
||||||
"typescript": "^3.7.2"
|
"prettier": "^1.18.2",
|
||||||
|
"typescript": "^3.5.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
// 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,
|
"noEmit": true,
|
||||||
"baseUrl": "./src"
|
"baseUrl": "./src"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user