cra-template-typescript-standard-prettier

The base TypeScript template for Create React App with StandardJS/Prettier and some essential libs.


Keywords
react, create-react-app, template, typescript, standard, standardjs, prettier, axios, react-router-dom, react-icons, styled-components, editorconfig, eslint, reactjs
License
MIT
Install
npm install cra-template-typescript-standard-prettier@1.0.19

Documentation

cra-template-typescript-standard-prettier

TypeScript template for Create React App with standardjs (eslint), prettier, editorconfig, axios, react-router-dom, react-icons and styled-components.

How to use

Please attention with the steps below:

To use this template, add --template https://github.com/marlosirapuan/cra-template-typescript-standard-prettier when creating a new app.

For example:

yarn create react-app my-app --template https://github.com/marlosirapuan/cra-template-typescript-standard-prettier

# or

npx create-react-app my-app --template https://github.com/marlosirapuan/cra-template-typescript-standard-prettier

IMPORTANT

Due to an eslint config limitation you have to install all dependencies that this config uses manually with:

yarn setup

# or

npm run setup-npm

Editor integration

VSCode

I recommend the best editor for JavaScript/TypeScript to use with this template: Visual Studio Code (VSCode).

And these extensions to best integration (Prettier extension it's not necessary!):

Change your settings.json:

    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },

That's it. Reload the window or restart your VSCode to load config.

Contributing

  1. Fork it
  2. Create a branch (git checkout -b feat/new-feature)
  3. Add changes (git add .)
  4. Commit (git commit -m 'add some feature)
  5. Push (git push origin feat/new-feature)
  6. Open a PR :D

License

cra-template-typescript-standard-prettier is open source software licensed as MIT.