{"id":19718,"library":"eslint-plugin-cup","title":"eslint-plugin-cup","description":"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.","status":"maintenance","version":"2.0.4","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/rtsao/create-universal-package","tags":["javascript","eslint","eslintplugin"],"install":[{"cmd":"npm install eslint-plugin-cup","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-cup","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-cup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, plugin requires ESLint 5.x - 6.x","package":"eslint","optional":false}],"imports":[{"note":"ESM import works; the package also provides a CommonJS entry via module.exports.","wrong":"const rules = require('eslint-plugin-cup').rules","symbol":"rules","correct":"import { rules } from 'eslint-plugin-cup'"},{"note":"Exported for programmatic use, but typically not needed.","wrong":"const configs = require('eslint-plugin-cup').configs","symbol":"configs","correct":"import { configs } from 'eslint-plugin-cup'"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['cup'],\n  rules: {\n    'cup/no-undef': 'error'\n  }\n};","lang":"javascript","description":"Configures ESLint to use the cup/no-undef rule instead of the default no-undef."},"warnings":[{"fix":"Disable the default 'no-undef' rule when using 'cup/no-undef'.","message":"cup/no-undef replaces the standard no-undef; both should not be used together.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider migrating to a custom rule or alternative solution.","message":"Package is no longer actively maintained; may not work with ESLint 7+.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install eslint-plugin-cup --save-dev","cause":"Missing local installation.","error":"Error: Failed to load plugin 'cup': Cannot find module 'eslint-plugin-cup'"},{"fix":"Use ESLint 5.x or 6.x, or check that the plugin is properly loaded.","cause":"ESLint version incompatible (requires 5.x - 6.x).","error":"Definition for rule 'cup/no-undef' was not found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}