Skip to content

KoenvanMeijeren/eslint-plugin-no-dimensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-no-dimensions

ESLint plugin to disallow the use of Dimensions.get('window') in react-native.

Installation

Install the plugin with npm:

npm install eslint-plugin-no-dimensions

Usage

In your .eslintrc file, add no-dimensions to your plugins and rules:

{
  "plugins": [
    "no-dimensions"
  ],
  "rules": {
    "no-dimensions/no-dimensions": "error"
  }
}

Release new version

To release a new version, run the following commands:

npm login
npm run release

Rules

no-dimensions

This rule checks for usage of Dimensions.get('window') and suggests using useWindowDimensions() instead.

License

This project is licensed under the MIT License.

About

ESLint plugin to disallow the use of Dimensions.get('window') in react-native.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published