How to start
suggest changeUse ESLint on a React Native project. ESLint checks code against rules from the community.
For React Native you can combine rulesets for JavaScript, React, and React Native.
The JavaScript rules, with motivation and examples, are at https://github.com/eslint/eslint/tree/master/docs/rules . You can enable the ESLint team's recommended set by adding 'eslint:recommended' to extends in .eslintrc.json ("extends": ["eslint:recommended"]). Configuring ESLint is documented at http://eslint.org/docs/developer-guide/development-environment . Read that guide before you rely on the tool.
The React plugin rules are documented at https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules . Not every React rule applies to React Native. For example, react/display-name and react/no-unknown-property often do not. Others matter on almost every React Native project, such as react/jsx-no-bind and react/jsx-key.
Be careful when you pick your own ruleset.
Finally, there is a plugin specifically for React Native: https://github.com/intellicode/eslint-plugin-react-native . If you keep styles in a separate file, react-native/no-inline-styles will not see them.
For ESLint to parse a React Native project, you may need an env entry like this. It does not by itself enable the React Native plugin:
"env": {
"browser": true,
"es6": true,
"amd": true
},
ESLint is a practical way to keep a project consistent.