Files
pezkuwi-telemetry/frontend/package.json
T
cybai d477cb8045 frontend: Upgrade TypeScript from 2.9.2 to 4.4.2 (#387)
* Upgrade TS from 2.9.2 to 4.4.2

* Avoid mutating a readonly array

`list` is a readonly array but `sort` will mutate the array in-place.
In newer version of TS, it can catch this unexpected behavior.

To avoid mutating a readonly array, we can sort with a new array with
either `[...list]` or `list.slice()`.

* Fix arguments of `window.location.reload`

The `reload` function type definition in `lib.dom.d.ts` takes 0
arguments now. So, we cannot pass a boolean to it.

Also, based on the documentation on MDN, Firefox is the only browser who
supports passing a `forceForget` boolean to `reload` function.
So, I wonder it should be fine to remove the boolean argument and align
the behavior to other browsers.

Ref: https://developer.mozilla.org/en-US/docs/Web/API/Location/reload
2021-08-27 16:33:42 +01:00

66 lines
1.9 KiB
JSON

{
"name": "@dotstats/frontend",
"version": "0.2.1",
"author": "Parity Technologies Ltd. <admin@parity.io>",
"license": "GPL-3.0",
"description": "Polkadot Telemetry frontend",
"scripts": {
"precommit": "lint-staged",
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "TS_NODE_PROJECT=tsconfig.test.json tape -r ts-node/register test/**/*spec.ts",
"test:coverage": "nyc yarn test",
"eject": "react-scripts-ts eject",
"pretty:check": "prettier --check src/**/*.{ts,tsx}",
"pretty:fix": "prettier --write src",
"clean": "rm -rf node_modules build .nyc ./tmp/env-config.js report*.json yarn-error.log"
},
"dependencies": {
"@polkadot/util-crypto": "^2.8.1",
"@types/react-measure": "^2.0.6",
"blakejs": "^1.1.0",
"husky": "^4.2.5",
"lint-staged": "^10.1.7",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-measure": "^2.3.0",
"react-scripts-ts": "3.1.0",
"stable": "^0.1.8",
"tslint": "^6.1.1"
},
"devDependencies": {
"@types/node": "^13.13.2",
"@types/react": "^16.9.34",
"@types/react-dom": "^16.9.6",
"@types/tape": "^4.13.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"identity-obj-proxy": "^3.0.0",
"istanbul": "^0.4.5",
"nyc": "^15.0.1",
"prettier": "^2.0.5",
"tape": "^4.13.2",
"ts-node": "^8.9.0",
"tslint": "^6.1.1",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "^4.4.2"
},
"lint-staged": {
"src/**/*.{ts,tsx,json,css}": [
"pretty:fix"
]
},
"resolutions": {
"chalk": "^2.4.2",
"node-forge": ">=0.10.0",
"yargs-parser": ">=13.1.2",
"dot-prop": ">=4.2.1",
"lodash": ">=4.17.19",
"serialize-javascript": ">=3.1.0",
"js-yaml": ">=3.13.1",
"webpack-dev-server": "^2.11.4",
"mem": ">=4.0.0"
}
}