cra-template-ts-craco-lint
Version:
Template for Create React App supporting TypeScript and SASS/SCSS files. Included with Prettier and ESlint config recommended by Airbnb. Axios, Craco, scoped scss, aliasing, redux-toolkit
78 lines (65 loc) • 2.44 kB
Markdown
> Use a new version of React 17 even without new features, now importing `React` into JSX files is optional.
> In addition to making things simpler with automatic injection of the JSX transformer, it also reduces the file size. [Read more...](https://reactjs.org/blog/2020/10/20/react-v17.html)
- [Node.js](https://nodejs.org) (**Node.js >= 8.10 and npm >= 5.6**)
Creating a [React](https://reactjs.org) project using a custom template.
```sh
npx create-react-app myapp --template ts-craco-lint
```
The CRA Custom Template does not yet have support for `devDependencies`, so I recommend edit your `package.json` to like this:
```json
{
"dependencies": {
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.3",
"@testing-library/user-event": "^12.6.0",
"@types/jest": "^26.0.20",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.14.0",
"eslint": "^7.18.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import-helpers": "^1.1.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"node-sass": "^4.14.1",
"prettier": "^2.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "^4.0.1",
"typescript": "4.1.3",
"web-vitals": "^1.1.0",
"axios": "^0.21.1",
"@craco/craco": "^6.1.1",
"craco-alias": "^2.1.1",
"craco-sass-resources-loader": "^1.1.0",
"craco-plugin-scoped-css": "^1.1.0",
"react-router-dom": "^5.2.0",
"@types/react-icons": "^3.0.0",
"@types/react-router-dom": "^5.1.7",
"react-spring": "^8.0.27",
"@types/react-redux": "^7.1.7",
"@reduxjs/toolkit": "^1.2.5",
"react-redux": "^7.2.0",
"@types/axios": "^0.14.0"
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"lint": "eslint src/ --ext .js,.jsx,.ts,.tsx",
"lint:fix": "npm run lint -- --fix"
}
}
````
[](https://choosealicense.com/licenses/mit)