eslint-plugin-cup

2.0.4 • Public • Published

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.

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;

/eslint-plugin-cup/

    Package Sidebar

    Install

    npm i eslint-plugin-cup

    Weekly Downloads

    242

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    10.6 kB

    Total Files

    6

    Last publish

    Collaborators

    • rtsao