{"id":19730,"library":"eslint-plugin-disallow-methods","title":"eslint-plugin-disallow-methods","description":"An ESLint plugin that disallows specified method calls on given objects. Current version 0.1.0, released as an early prototype with unstable API (under active development). Key differentiator: allows custom configuration of blocked methods per object via ESLint rules, targeting method calls like `foo.bar()` rather than generic function calls. Alternative to no-restricted-syntax with a more declarative approach. Development appears stalled; no updates since initial release.","status":"abandoned","version":"0.1.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","eslint","eslintplugin"],"install":[{"cmd":"npm install eslint-plugin-disallow-methods","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-disallow-methods","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-disallow-methods","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin to function","package":"eslint","optional":false}],"imports":[{"note":"Plugin is used via string name in .eslintrc plugins array, not require()","wrong":"require('eslint-plugin-disallow-methods') in .eslintrc","symbol":"plugin","correct":"plugins: ['disallow-methods']"},{"note":"Rule name is scoped to the plugin: 'disallow-methods/disallow-methods'","wrong":"\"disallow-methods\": [2, []]","symbol":"disallow-methods rule","correct":"\"disallow-methods/disallow-methods\": [2, [{\"object\": \"x\", \"method\": \"y\"}]]"},{"note":"No JS import; config is JSON or CommonJS export","wrong":"import { 'disallow-methods' } from 'eslint-plugin-disallow-methods'","symbol":"ESLint config export","correct":"module.exports = { plugins: ['disallow-methods'], rules: { 'disallow-methods/disallow-methods': [2, []] } }"}],"quickstart":{"code":"{\n  \"plugins\": [\"disallow-methods\"],\n  \"rules\": {\n    \"disallow-methods/disallow-methods\": [\"error\", [\n      { \"object\": \"console\", \"method\": \"log\" },\n      { \"object\": \"eval\", \"method\": \"*\" }\n    ]]\n  }\n}","lang":"javascript","description":"Shows basic ESLint configuration to disallow console.log and any method on eval."},"warnings":[{"fix":"Lock version to exact 0.1.0 or consider alternative plugins.","message":"API may change at any time; do not rely on stable configuration.","severity":"breaking","affected_versions":"0.x"},{"fix":"Use full scoped rule name in rules configuration.","message":"Rule name is 'disallow-methods/disallow-methods', not 'disallow-methods'.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use '*' as method value to block all method calls on that object.","message":"Method wildcard '*' disallows all methods on the object.","severity":"gotcha","affected_versions":">=0.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-disallow-methods --save-dev' and ensure node_modules is correct.","cause":"Plugin not installed or ESLint cannot resolve it.","error":"Error: Cannot find module 'eslint-plugin-disallow-methods'"},{"fix":"Change rule name to 'disallow-methods/disallow-methods'.","cause":"Using wrong rule name without plugin scope prefix.","error":"Configuration for rule \"disallow-methods\" is invalid: Definition for rule 'disallow-methods' was not found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}