# eslint-plugin-cup

> ESlint rules for create-universal-package

Latest version **2.0.4** (published 2022-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-cup
pnpm add eslint-plugin-cup
yarn add eslint-plugin-cup
bun add eslint-plugin-cup
```

## 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 | 2.0.4 |
| Published | 2022-01-20 |
| First published | 2017-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36 |
| Author | Ryan Tsao |
| Maintainers | rtsao |
| Keywords | eslint, eslintplugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-cup
- Repository: https://github.com/rtsao/create-universal-package
- Issues: https://github.com/rtsao/create-universal-package/issues
- npm.io page: https://npm.io/package/eslint-plugin-cup

## Dependencies (1)

- [globals](https://npm.io/package/globals.md) ^11.5.0

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 2.0.4 (latest) — 2022-01-20
- 2.0.3 — 2020-03-31
- 2.0.2 — 2019-09-06
- 2.0.1 — 2019-01-25
- 2.0.0 — 2018-06-26
- 1.0.2 — 2018-05-09
- 1.0.0 — 2017-11-10
- 1.0.0-rc.5 — 2017-11-10
- 1.0.0-rc.4 — 2017-07-14
- 1.0.0-rc.3 — 2017-06-22
- 1.0.0-rc.2 — 2017-05-03

## README

# eslint-plugin-cup

ESLint rules for create-universal-package

## Rules

### `cup/no-undef`

The same as the vanilla `no-undef`, but only allows environment-specific globals if guarded by environment checks.

```js
process.title; // fails `cup/no-undef`
window.location; // fails `cup/no-undef`

// passes lint
if (__BROWSER__) {
  document.body.appendChild(document.createTextNode('hello world'));
}

// passes lint
if (__NODE__) {
  process.stdout.write('hello world');
}

// passes lint
const topLevel = __BROWSER__ ? window : global;
```

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