Helpful ESLint rules for React Native
Add the package to your project by running:
npm i -D @public-js/eslint-plugin-react-native
Add the following to your ESLint config or modify the existing properties:
module.exports = {
// ...
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: { jsx: true },
},
plugins: [
// ...
'@public-js/eslint-plugin-react-native',
],
// ...
};
- 🔧 - Some problems reported by the rule can be fixed automatically by the
--fix
option - 💡 - Some problems reported by the rule can be fixed manually with IDE suggestions
Name | Description | ||
---|---|---|---|
stylesheet-rational-order | Sorts related property declarations by grouping together. | 🔧 | 💡 |
MIT, full license text. Read more about it on TLDRLegal.