Update using create-react-app
Initialized a new frontend using cra. Non-cra dependencies were copied by their package.json entry - this means that all other packages are upgraded as well although this mostly isn't reflected in their package.json
entry as it mostly only specified a min version which still matches.
Changes that had to be made as a consequence of the update:
- Add alt to all
<img>
tags - Switch from tslint to eslint + resolve issues between them → Change Dockerfile
- Add types to conform to typescripts typing rules which are more strict.
{} / object
can be used in fewer cases. Initialization of class members is also required which meant that| undefined
had to be introduced in some cases. - Usage of
confirm
is against aslant rules per default config. Currently prepended all lines withconfirm
with an ignore comment. -
moment
exports its main function as a default export:import * as moment from "moment"
→import moment from "moment"
. -
ReactMarkdown
exports its main component as a default export:import * as ReactMarkdown from "react-markdown"
→import ReactMarkdown from "react-markdown"
. - !36 (merged) is needed for strict key types.
-
forEach
loop isn't allowed in some cases by the defaulteslint
ruleset (Was replace withfor (const a of b)
) - Renamed
.prettierrc
→.prettierrc.json
- Fixed CSP problem by overriding env variable during production compilation
Edited by Lukas Möller