ESLint & Prettierrc
ES Lint plugin - write your code more clean, tells where you are making mistakes, and generally it’s good practice to work in a team so that everyone has everything one style - ES Lint will tell you which variables you don’t use, where and which components you don’t use, it shows syntax errors and where you don't put spaces correctly, where do you put semicolons, etc. That is, this is already a standard defect that you need to use in writing your code and this plugin will save you from many silly mistakes that you make when developing your application.
Prettierrc - Code formatting tool with support for many languages, a minimum of configuration and a maximum of imposed rules.
#
Install dependencies#
Eslint RulesAdd rules to .eslintrc.js
#
Prettierrc RulesAdd rules to .prettierrc.js
#
Editing package.jsonWhere to add the scripts:
- Simulator. For me, this is iPhone SE since its screen size is the minimum layout requirement (iPhone 3.4 is already all)
- Linter, which will forbid you to push until all errors in the code are fixed
- Install Pods
#
Transferring App.jsCreate the src
folder and transfer the App.js file there, renaming it src/index.js
#
Launch the applicationyarn start-ios
or yarn start-android