{"id":19852,"library":"eslint-plugin-no-null","title":"eslint-plugin-no-null","description":"An ESLint plugin that provides a single rule to disallow null literals, enforcing the use of undefined instead. Version 1.0.2 is the latest stable release. It has no dependencies beyond ESLint (peer dependency >=3.0.0) and is not actively maintained (last release likely older). Differentiators: simple, focused rule for teams preferring undefined over null.","status":"maintenance","version":"1.0.2","language":"javascript","source_language":"en","source_url":"git://github.com/nene/eslint-plugin-no-null","tags":["javascript","eslint","eslint-plugin"],"install":[{"cmd":"npm install eslint-plugin-no-null","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-no-null","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-no-null","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin to function","package":"eslint","optional":false}],"imports":[{"note":"Plugin is a default export; CJS require also works but ESM is preferred for modern projects.","wrong":"const noNull = require('eslint-plugin-no-null')","symbol":"plugin","correct":"import noNull from 'eslint-plugin-no-null'"}],"quickstart":{"code":"// Install ESLint and plugin\n// npm install eslint eslint-plugin-no-null --save-dev\n\n// .eslintrc.json\n{\n  \"plugins\": [\"no-null\"],\n  \"rules\": {\n    \"no-null/no-null\": \"error\"\n  }\n}\n\n// Example file: app.js\n// Disallowed: let x = null;\n// Allowed: let y = undefined;","lang":"javascript","description":"Shows installation, configuration, and usage of the no-null rule in an ESLint config."},"warnings":[{"fix":"Consider alternatives like ESLint's built-in 'no-restricted-syntax' rule or 'unicorn/no-null'.","message":"Plugin is no longer actively maintained; may not work with latest ESLint versions.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use 'no-restricted-syntax' with a custom selector for more comprehensive null detection.","message":"Rule only flags null literals, not expressions that may evaluate to null.","severity":"gotcha","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":"Run npm install eslint-plugin-no-null --save-dev","cause":"The plugin is not installed or missing from node_modules.","error":"ESLint: Failed to load plugin 'no-null': Cannot find module 'eslint-plugin-no-null'"},{"fix":"Change \"no-null/no-null\": 2 to \"no-null/no-null\": \"error\"","cause":"Using numeric severity instead of string in ESLint config.","error":"ESLint: Configuration for rule 'no-null/no-null' is invalid: Value \"2\" is invalid for rule severity."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}