Skip to content

Commit

Permalink
feat!: support typescript v4, eslint v7, jest 27 (jaredpalmer#1)
Browse files Browse the repository at this point in the history
* feat!: upgrade typescript v4 + eslint v7

* feat!: upgrade jest 27

* fix: eslint-config-prettier

refs: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21

* chore: rename pkg.name
  • Loading branch information
aladdin-add committed Jul 16, 2021
1 parent 462af2d commit bbb3a74
Show file tree
Hide file tree
Showing 8 changed files with 4,442 additions and 4,539 deletions.
6 changes: 1 addition & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
module.exports = {
extends: [
'react-app',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
extends: ['react-app', 'prettier', 'plugin:prettier/recommended'],
};
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
package-lock=false
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "tsdx",
"name": "@weiran.zsd/tsdx",
"version": "0.14.1",
"author": "Jared Palmer <jared@palmer.net>",
"description": "Zero-config TypeScript package development",
Expand Down Expand Up @@ -38,7 +38,7 @@
"templates"
],
"engines": {
"node": ">=10"
"node": ">=12"
},
"dependencies": {
"@babel/core": "^7.4.4",
Expand All @@ -52,9 +52,9 @@
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.2.1",
"@types/jest": "^25.2.1",
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"@types/jest": "^26.0.24",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@typescript-eslint/parser": "^4.28.3",
"ansi-escapes": "^4.2.1",
"asyncro": "^3.0.0",
"babel-eslint": "^10.0.3",
Expand All @@ -66,18 +66,18 @@
"camelcase": "^6.0.0",
"chalk": "^4.0.0",
"enquirer": "^2.3.4",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-config-react-app": "^5.2.1",
"eslint-plugin-flowtype": "^3.13.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^2.2.0",
"eslint": "^7.19.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.8.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"execa": "^4.0.3",
"fs-extra": "^9.0.0",
"jest": "^25.3.0",
"jest": "^27.0.6",
"jest-watch-typeahead": "^0.5.0",
"jpjs": "^1.2.1",
"lodash.merge": "^4.6.2",
Expand All @@ -94,9 +94,9 @@
"semver": "^7.1.1",
"shelljs": "^0.8.3",
"tiny-glob": "^0.2.6",
"ts-jest": "^25.3.1",
"ts-jest": "^27.0.3",
"tslib": "^1.9.3",
"typescript": "^3.7.3"
"typescript": "^4"
},
"devDependencies": {
"@types/eslint": "^6.1.2",
Expand Down
6 changes: 1 addition & 5 deletions src/createEslintConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ export async function createEslintConfig({
const isReactLibrary = Boolean(getReactVersion(pkg));

const config = {
extends: [
'react-app',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
extends: ['react-app', 'prettier', 'plugin:prettier/recommended'],
settings: {
react: {
// Fix for https://github.com/jaredpalmer/tsdx/issues/279
Expand Down
2 changes: 1 addition & 1 deletion templates/react-with-storybook/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"@types/react": "^16.9.11",
"@types/react-dom": "^16.8.4",
"parcel": "^1.12.3",
"typescript": "^3.4.5"
"typescript": "^4"
}
}
2 changes: 1 addition & 1 deletion templates/react/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"@types/react": "^16.9.11",
"@types/react-dom": "^16.8.4",
"parcel": "^1.12.3",
"typescript": "^3.4.5"
"typescript": "^4"
}
}
2 changes: 1 addition & 1 deletion test/e2e/fixtures/build-default/src/syntax/generator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// regression test for generators
export function* testGenerator() {
export function* testGenerator(): IterableIterator<boolean> {
return yield true;
}
Loading

0 comments on commit bbb3a74

Please sign in to comment.