This project was bootstrapped with Create React App and is written in Typescript
.
Tools and libraries used:
ESlint
is a static code analysis tool that is used only for enforcing code quality (and not formatting) rules. These rules are specified in.eslintrc.js
in the root of the project,Prettier
is an opinionated code formatter with very few configuration options and this project uses very few overrides,npm
is a package manager and build tool for installing dependencies and running scripts frompackage.json
.
-
.eslintrc.js
includes eslint configuration, it extends the defaultcreate-react-app
config (react-app
inextends
) and overrides/adds some more useful rules (e.g. only named exports, prefer arrow functions etc.), -
.prettierignore
is like.gitignore
but forprettier
, -
.prettierrc
includes code formatting configuration, -
package-lock.json
stores the exact dependency tree every time there is a modification ofnode_modules
to ensure consistent behavior when building the project in different environments, -
package.json
stores the project's metadata - dependencies with versions, build scripts, version etc., -
project.code-workspace
defines a vscode workspace, which will activate vscode settings under.vscode/settings.json
-
tsconfig.json
specifies root files and TS compiler options, see docs for more details,
Running locally:
- install LTS version of
nodejs
, - install
vscode
, vscode
extensionseslint
andprettier
.
The project should be opened as a workspace in vscode
from project.code-workspace
.
In the project directory, you can run:
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Runs linting and builds the app for production to the build
folder. It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Runs eslint
linting rules and treats warnings as errors.