Registry / testing / eslint-plugin-cup

eslint-plugin-cup

JSON →
library2.0.4jsnpmunverified

ESLint plugin for create-universal-package (cup), providing a custom no-undef rule that allows environment-specific globals (e.g., window, process) only when guarded by __BROWSER__ or __NODE__ checks. Current stable version 2.0.4, last release likely in 2019. Designed for universal code that runs in both browser and Node.js, enforcing that environment-sensitive globals are used only within appropriate conditional blocks. Requires ESLint 5.x or 6.x. Not actively maintained.

npm install eslint-plugin-cup
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-CUP
E
eslint-plugin-cup
testingjavascriptv2.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rules
import { rules } from 'eslint-plugin-cup'
const rules = require('eslint-plugin-cup').rules
ESM import works; the package also provides a CommonJS entry via module.exports.
configs
import { configs } from 'eslint-plugin-cup'
const configs = require('eslint-plugin-cup').configs
Exported for programmatic use, but typically not needed.

Configures ESLint to use the cup/no-undef rule instead of the default no-undef.

// .eslintrc.js module.exports = { plugins: ['cup'], rules: { 'cup/no-undef': 'error' } };
Debug
Known issues
gotchacup/no-undef replaces the standard no-undef; both should not be used together.
fix
Disable the default 'no-undef' rule when using 'cup/no-undef'.
affects: >=1.0.0
deprecatedPackage is no longer actively maintained; may not work with ESLint 7+.
fix
Consider migrating to a custom rule or alternative solution.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'cup': Cannot find module 'eslint-plugin-cup'
Missing local installation.
fix
npm install eslint-plugin-cup --save-dev
Definition for rule 'cup/no-undef' was not found.
ESLint version incompatible (requires 5.x - 6.x).
fix
Use ESLint 5.x or 6.x, or check that the plugin is properly loaded.
Upgrade
Version history
2.0.4latest on npm
Audit
Dependencies
eslintrequiredpeer dependency, plugin requires ESLint 5.x - 6.x
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-cup — npm install eslint-plugin-cup · libregistry