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 havejestwatch your files by runningyarn test:watch. - To lint
JavaScriptfiles, runyarn lint. Optionally you can runyarn lint --fixto apply automatic fixes. - To prettify files, run
yarn pretty. By default, the command prettifies.ts,.js,.css,.html,.json, and.mdfiles. You may extend this list by adding more file extensions to theprettysection ofscriptsinpackage.json.
-
Add
.prettierrcfile to root of project. See available configurations on the site. -
Install
prettieras a development dependency.yarn add prettier -D -
Install prettier-vscode from the
vs-codeextension store. -
Create
prettyscript command.
- Add
.eslintrc.jsfile to the root of the project. - Create
lintscript command
-
Add and configure
enzymetest 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-typesvalidation library and enable ineslint.