Skip to content

A starter template for Create React App with ESLint, Prettier and unit-tests best practices

Notifications You must be signed in to change notification settings

sergei97k/cra-quick-start

Repository files navigation

cra-quick-start

Getting started

Step 1: Clone this repo

git clone https://github.com/sergei97k/cra-quick-start

cd cra-quick-start

Step 2: Install

yarn install
// or
npm install

Step 3: Start

yarn start
// or
npm run start

List of NPM Scripts

yarn dev         # build and watch, but javascript not minified
yarn build       # build a minified production version
yarn test        # run test using Jest and Enzyme
yarn test:cover  # run test using Jest and Enzyme with coverage report
yarn eject       # remove the single build dependency from your project

List of used dependencies

  • ESLint
  • Prettier
  • Husky
  • Jest
  • Enzyme

Absolute Imports

The presence of jsconfig.json file in a directory indicates that the directory is the root of a project.

if you want to import a module located at src/components/Button.js, you can import the module like so:

import Button from "components/Button";

For more information on this configuration file, see the jsconfig.json reference documentation.

WebStorm settings

ESLint configuration:

  1. Open WebStorm -> Preferences and find ESLint
  2. Set option "Automatic ESLint configuration" or "Manual ESLint configuration"

ESLint configuration

Prettier configuration:

  1. Open WebStorm -> Preferences and find Prettier
  2. Select Prettier package

Prettier configuration

About

A starter template for Create React App with ESLint, Prettier and unit-tests best practices

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published