# eslint-plugin-no-dimensions

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

Latest version **1.2.0** (published 2023-12-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-no-dimensions
pnpm add eslint-plugin-no-dimensions
yarn add eslint-plugin-no-dimensions
bun add eslint-plugin-no-dimensions
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-12-20 |
| First published | 2023-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | koenvanmeijeren |
| Maintainers | koenvanmeijeren |
| Keywords | eslint, eslintplugin, eslint-plugin, react-native, dimensions |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-no-dimensions
- Repository: https://github.com/KoenvanMeijeren/eslint-plugin-no-dimensions
- Homepage: https://github.com/KoenvanMeijeren/eslint-plugin-no-dimensions#readme
- Issues: https://github.com/KoenvanMeijeren/eslint-plugin-no-dimensions/issues
- npm.io page: https://npm.io/package/eslint-plugin-no-dimensions

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2023-12-20
- 1.1.0 — 2023-12-20
- 1.0.1 — 2023-12-15
- 1.0.0 — 2023-12-15

## README

# eslint-plugin-no-dimensions

ESLint plugin to disallow the use of Dimensions.get('window') in react-native.

## Installation

Install the plugin with npm:

```bash
npm install eslint-plugin-no-dimensions
```

## Usage
In your .eslintrc file, add no-dimensions to your plugins and rules:

```json
{
  "plugins": [
    "no-dimensions"
  ],
  "rules": {
    "no-dimensions/no-dimensions": "error"
  }
}
```

## Release new version

To release a new version, run the following commands:

```bash
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.

---
_Source: https://npm.io/package/eslint-plugin-no-dimensions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
