Forked from react-redux-base
Preview at http://chidimo.github.io/react-redux-base
A live preview of this template is available at http://chidimo.github.io/react-redux-base
- To run tests, use command
yarn test
. Coverage report is automatically generated and placed in thecoverage/
folder. To view the report, open/coverage/lcov-report/index.html
. You can havejest
watch your files by runningyarn test:watch
. - To lint
JavaScript
files, runyarn lint
. Optionally you can runyarn lint --fix
to apply automatic fixes. - To prettify files, run
yarn pretty
. By default, the command prettifies.ts
,.js
,.css
,.html
,.json
, and.md
files. You may extend this list by adding more file extensions to thepretty
section ofscripts
inpackage.json
.
-
Add
.prettierrc
file to root of project. See available configurations on the site. -
Install
prettier
as a development dependency.yarn add prettier -D
-
Install prettier-vscode from the
vs-code
extension store. -
Create
pretty
script command.
- Add
.eslintrc.js
file to the root of the project. - Create
lint
script command
-
Add and configure
enzyme
test library. Guideyarn add -D enzyme enzyme-adapter-react-16 enzyme-to-json yarn add -D redux-mock-store yarn add -D babel-jest @babel/core @babel/preset-env @babel/preset-react yarn add -D sinon chai yarn add -D @babel/plugin-proposal-class-properties
-
Mock out css styles in jest
The app is laid out with a flexbox in such a way that no empty space will remain at the bottom. The app will completely occuppy the height of the viewport.
<section id="root">
<header>
<nav></nav>
</header>
<main class="container">
<section></section>
</main>
</section>
- Add
prop-types
validation library and enable ineslint
.