Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 8a22363

Browse files
committed
Update prettier version
1 parent 3b91d88 commit 8a22363

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Transforms React code written in JavaScript to TypeScript.
88

99
## Features:
1010

11-
* Proxies `PropTypes` to `React.Component` generic type and removes PropTypes
12-
* Provides state typing for `React.Component` based on initial state and `setState()` calls in the component
13-
* Hoist large interfaces for props and state out of `React.Component<P, S>` into declared types
14-
* Convert functional components with `PropTypes` property to TypeScript and uses propTypes to generate function type declaration
11+
- Proxies `PropTypes` to `React.Component` generic type and removes PropTypes
12+
- Provides state typing for `React.Component` based on initial state and `setState()` calls in the component
13+
- Hoist large interfaces for props and state out of `React.Component<P, S>` into declared types
14+
- Convert functional components with `PropTypes` property to TypeScript and uses propTypes to generate function type declaration
1515

1616
## Example
1717

package.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,23 @@
1515
"prebuild": "npm run clean",
1616
"build": "tsc --pretty",
1717
"precommit": "lint-staged",
18-
"prettier": "prettier --write *.{js,json,css,md,ts,tsx}"
18+
"prettier": "prettier --write \"**/*.{js,json,css,md,ts,tsx}\""
1919
},
2020
"jest": {
2121
"transform": {
2222
".ts": "<rootDir>/node_modules/ts-jest/preprocessor.js"
2323
},
2424
"testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
25-
"moduleFileExtensions": ["ts", "js"]
25+
"moduleFileExtensions": [
26+
"ts",
27+
"js"
28+
]
2629
},
2730
"lint-staged": {
28-
"*.{js,json,css,md,ts,tsx}": ["node_modules/.bin/prettier --write", "git add"]
31+
"*.{js,json,css,md,ts,tsx}": [
32+
"node_modules/.bin/prettier --write",
33+
"git add"
34+
]
2935
},
3036
"bin": "dist/cli.js",
3137
"author": "Mohsen Azimi <me@azimi.me>",
@@ -36,7 +42,7 @@
3642
"detect-indent": "^5.0.0",
3743
"glob": "^7.1.2",
3844
"lodash": "^4.17.10",
39-
"prettier": "^1.12.1",
45+
"prettier": "^1.18.2",
4046
"typescript": "2.8.3"
4147
},
4248
"devDependencies": {
@@ -47,7 +53,7 @@
4753
"@types/jest": "^22.2.3",
4854
"@types/lodash": "^4.14.109",
4955
"@types/node": "^10.1.2",
50-
"@types/prettier": "^1.12.2",
56+
"@types/prettier": "^1.18.2",
5157
"@types/react": "^16.3.14",
5258
"dedent": "^0.7.0",
5359
"husky": "^0.14.3",

yarn.lock

+8-6
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@
6464
version "10.1.2"
6565
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.1.2.tgz#1b928a0baa408fc8ae3ac012cc81375addc147c6"
6666

67-
"@types/prettier@^1.12.2":
68-
version "1.12.2"
69-
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.12.2.tgz#4a37f0aa8ed20366ada6fa7994b1c6dfe787fdd1"
67+
"@types/prettier@^1.18.2":
68+
version "1.18.2"
69+
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.18.2.tgz#069e7d132024d436fd1f5771f6932426a695f230"
70+
integrity sha512-2JBasa5Qaj81Qsp/dxX2Njy+MdKC767WytHUDsRM7TYEfQvKPxsnGpnCBlBS1i2Aiv1YwCpmKSbQ6O6v8TpiKg==
7071

7172
"@types/react@^16.3.14":
7273
version "16.3.14"
@@ -2894,9 +2895,10 @@ preserve@^0.2.0:
28942895
version "0.2.0"
28952896
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
28962897

2897-
prettier@^1.12.1:
2898-
version "1.12.1"
2899-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"
2898+
prettier@^1.18.2:
2899+
version "1.18.2"
2900+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
2901+
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
29002902

29012903
pretty-format@^22.4.0, pretty-format@^22.4.3:
29022904
version "22.4.3"

0 commit comments

Comments
 (0)