upgrade TypeScript to 4.0
This commit is contained in:
parent
5449ac6395
commit
b9de4223f8
|
|
@ -22,3 +22,4 @@ rules:
|
||||||
'@typescript-eslint/no-misused-promises':
|
'@typescript-eslint/no-misused-promises':
|
||||||
- off
|
- off
|
||||||
- checksVoidReturn: false
|
- checksVoidReturn: false
|
||||||
|
'@typescript-eslint/unbound-method': off
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
"ts-jest": "^26.0.0",
|
"ts-jest": "^26.0.0",
|
||||||
"ts-loader": "^7.0.4",
|
"ts-loader": "^7.0.4",
|
||||||
"ts-node": "^8.10.2",
|
"ts-node": "^8.10.2",
|
||||||
"typescript": "^3.9.2",
|
"typescript": "^4.0.2",
|
||||||
"url-loader": "^4.1.0",
|
"url-loader": "^4.1.0",
|
||||||
"webpack": "^4.43.0",
|
"webpack": "^4.43.0",
|
||||||
"webpack-cli": "^3.3.11",
|
"webpack-cli": "^3.3.11",
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ type State = {
|
||||||
invisible: boolean
|
invisible: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
class Captcha extends React.Component<{}, State> {
|
class Captcha extends React.Component<null, State> {
|
||||||
state: State
|
state: State
|
||||||
ref: React.MutableRefObject<Reaptcha | null>
|
ref: React.MutableRefObject<Reaptcha | null>
|
||||||
|
|
||||||
constructor(props: {}) {
|
constructor(props: null) {
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
value: '',
|
value: '',
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ const Show: React.FC = () => {
|
||||||
const textureUrl = `${blessing.base_url}/textures/${texture.hash}`
|
const textureUrl = `${blessing.base_url}/textures/${texture.hash}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
{container &&
|
{container &&
|
||||||
createPortal(
|
createPortal(
|
||||||
<React.Suspense fallback={<ViewerSkeleton />}>
|
<React.Suspense fallback={<ViewerSkeleton />}>
|
||||||
|
|
@ -356,7 +356,7 @@ const Show: React.FC = () => {
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div className="col-7 text-truncate" title={texture.name}>
|
<div className="col-7 text-truncate" title={texture.name}>
|
||||||
{texture.name}
|
{texture.name}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -368,7 +368,7 @@ const Show: React.FC = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="row my-4">
|
<div className="row my-4">
|
||||||
|
|
@ -378,7 +378,7 @@ const Show: React.FC = () => {
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div className="col-7">
|
<div className="col-7">
|
||||||
{texture.type === TextureType.Cape
|
{texture.type === TextureType.Cape
|
||||||
? t('general.cape')
|
? t('general.cape')
|
||||||
|
|
@ -392,7 +392,7 @@ const Show: React.FC = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="row my-4">
|
<div className="row my-4">
|
||||||
|
|
@ -416,7 +416,7 @@ const Show: React.FC = () => {
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
) : isUploaderExists ? (
|
) : isUploaderExists ? (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<a href={linkToUploader} target="_blank">
|
<a href={linkToUploader} target="_blank">
|
||||||
{nickname}
|
{nickname}
|
||||||
|
|
@ -432,7 +432,7 @@ const Show: React.FC = () => {
|
||||||
</span>
|
</span>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</>
|
||||||
) : (
|
) : (
|
||||||
nickname
|
nickname
|
||||||
)}
|
)}
|
||||||
|
|
@ -482,7 +482,7 @@ const Show: React.FC = () => {
|
||||||
}}
|
}}
|
||||||
onClose={handleCloseModalApply}
|
onClose={handleCloseModalApply}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ const Players: React.FC = () => {
|
||||||
search.append('cape', 'true')
|
search.append('cape', 'true')
|
||||||
}
|
}
|
||||||
const { code, message } = await fetch.del<fetch.ResponseBody>(
|
const { code, message } = await fetch.del<fetch.ResponseBody>(
|
||||||
`${urls.user.player.clear(selected)}?${search}`,
|
`${urls.user.player.clear(selected)}?${search.toString()}`,
|
||||||
)
|
)
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
toast.success(message)
|
toast.success(message)
|
||||||
|
|
@ -159,7 +159,7 @@ const Players: React.FC = () => {
|
||||||
const closeModalReset = () => setShowModalReset(false)
|
const closeModalReset = () => setShowModalReset(false)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<>
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<div className="card-header">
|
<div className="card-header">
|
||||||
<input
|
<input
|
||||||
|
|
@ -229,7 +229,7 @@ const Players: React.FC = () => {
|
||||||
onSubmit={resetTexture}
|
onSubmit={resetTexture}
|
||||||
onClose={closeModalReset}
|
onClose={closeModalReset}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9052,10 +9052,10 @@ typedarray@^0.0.6:
|
||||||
resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||||
|
|
||||||
typescript@^3.9.2:
|
typescript@^4.0.2:
|
||||||
version "3.9.2"
|
version "4.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9"
|
resolved "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
|
||||||
integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==
|
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
|
||||||
|
|
||||||
union-value@^1.0.0:
|
union-value@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user