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.
{} / objectcan be used in fewer cases. Initialization of class members is also required which meant that| undefinedhad to be introduced in some cases. - Usage of
confirmis against aslant rules per default config. Currently prepended all lines withconfirmwith an ignore comment. -
momentexports its main function as a default export:import * as moment from "moment"→import moment from "moment". -
ReactMarkdownexports 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.
-
forEachloop isn't allowed in some cases by the defaulteslintruleset (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