Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Latest commit

 

History

History
41 lines (29 loc) · 964 Bytes

README.md

File metadata and controls

41 lines (29 loc) · 964 Bytes

⚠️ This repo is no longer maintained

Package has been renamed to @public-js/eslint-plugin-react-native


Helpful ESLint rules especially for those using TypeScript.

Getting Started

Add the required packages to your project by running:

npm install eslint typescript @typescript-eslint/parser @public-js/eslint-plugin --save-dev

Then configure ESLint as you wish.

And finally add the following to your eslintrc file (or just modify the required properties):

// ...
parser: '@typescript-eslint/parser'
// ...
parserOptions: {
    ecmaFeatures: { jsx: true }
}
// ...
plugins: ['@public-js'] // append this plugin, don't replace everything
// ...

Rules

rn-stylesheet-rational

Sorting React Native Stylesheet's properties in rational order

Usage:

'@public-js/rn-stylesheet-rational': ['warn', { borderInBoxModel: false }]