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 pathimport/no-extraneous-dependencies: Forbid the use of extraneous packagesreact/jsx-filename-extension: Restrict file extensions that may contain JSXreact/jsx-props-no-spreading: Disallow JSX props spreadingreact/function-component-definition: Enforce a specific function type for function componentsno-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 definedreact/react-in-jsx-scope: Prevent missing React when using JSX
Prettier Rules
printWidth:120semi:falsesingleQuote:truetabWidth:2trailingComma:es5useTabs:false
Learn More
You can learn more about Custom Templates in the Create React App dev documentation.