1.0.2 • Published 4 years ago
@dany-eduard/cra-template-ts-eslint-prettier v1.0.2
cra-template-ts-eslint-prettier
React template in TypeScript preconfigured with Eslint and Prettier. The base project was created with create-react-app using the typescript template using the command npx create-react-app my-app --template typescript.
Install
npx create-react-app my-app --template @dany-eduard/cra-template-ts-eslint-prettierYou must install the packages after installing. Use
npm ioryarn install
Git Clone
git clone https://github.com/dany-eduard/cra-template-ts-eslint-prettier.gitEslint Rules
- import/extensions: Ensure consistent use of file extension within the import path
- import/no-extraneous-dependencies: Forbid the use of extraneous packages
- react/jsx-filename-extension: Restrict file extensions that may contain JSX
- react/jsx-props-no-spreading: Disallow JSX props spreading
- react/function-component-definition: Enforce a specific function type for function components
- no-use-before-define: Disallow the use of variables before they are defined
- @typescript-eslint/no-use-before-define: Disallow the use of variables before they are defined
- react/react-in-jsx-scope: Prevent missing React when using JSX
Prettier Rules
- printWidth:- 120
- semi:- false
- singleQuote:- true
- tabWidth:- 2
- trailingComma:- es5
- useTabs:- false
Learn More
You can learn more about Custom Templates in the Create React App dev documentation.