{"id":19861,"library":"eslint-plugin-no-use-extend-native","title":"eslint-plugin-no-use-extend-native","description":"ESLint plugin (v0.7.2) to prevent use of extended native objects like arrays, strings, and prototypes. Works alongside ESLint's no-extend-native rule to ensure code doesn't depend on prototype modifications from libraries such as 'colors'. Requires Node >=18.18.0 and ESLint ^9.3.0 (flat config only). Actively maintained with periodic updates.","status":"active","version":"0.7.2","language":"javascript","source_language":"en","source_url":"https://github.com/dustinspecker/eslint-plugin-no-use-extend-native","tags":["javascript","eslint","eslintplugin","eslint-plugin","extend","native","prototype"],"install":[{"cmd":"npm install eslint-plugin-no-use-extend-native","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-no-use-extend-native","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-no-use-extend-native","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency – plugin requires ESLint ^9.3.0","package":"eslint","optional":false}],"imports":[{"note":"ESM-only since v0.5.0; requires ESLint flat config.","wrong":"const eslintPluginNoUseExtendNative = require('eslint-plugin-no-use-extend-native')","symbol":"default","correct":"import eslintPluginNoUseExtendNative from 'eslint-plugin-no-use-extend-native'"},{"note":"Named export for recommended config; use flat config only.","wrong":"require('eslint-plugin-no-use-extend-native').configs.recommended","symbol":"configs.recommended","correct":"import { configs } from 'eslint-plugin-no-use-extend-native';\n// use configs.recommended"},{"note":"Access rule definition directly when building custom configs.","wrong":"require('eslint-plugin-no-use-extend-native').rules","symbol":"rules (for custom config)","correct":"import { rules } from 'eslint-plugin-no-use-extend-native';\n// rules['no-use-extend-native'] is the rule object"}],"quickstart":{"code":"// eslint.config.js\nimport eslintPluginNoUseExtendNative from 'eslint-plugin-no-use-extend-native'\n\nexport default [\n  // Preset config (enables rule as error)\n  eslintPluginNoUseExtendNative.configs.recommended,\n  // Or manually:\n  // {\n  //   plugins: { 'no-use-extend-native': eslintPluginNoUseExtendNative },\n  //   rules: { 'no-use-extend-native/no-use-extend-native': 2 },\n  // },\n]","lang":"javascript","description":"Shows how to configure the plugin in eslint.config.js using the provided recommended config or manual setup."},"warnings":[{"fix":"Use ESM imports and eslint.config.js file; remove .eslintrc usage.","message":"v0.5.0 dropped CommonJS support; flat config only.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Update rule key if you had custom rule configuration.","message":"v0.4.0 changed rule name from 'no-use-extend-native/no-use-extend-native' to same but broke some custom configurations.","severity":"breaking","affected_versions":">=0.4.0 <0.5.0"},{"fix":"Use dynamic import or manual review for runtime prototype modifications.","message":"Plugin does not detect extensions made after the check – only static analysis.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to latest version and use ESLint flat config.","message":"v0.3.x was last to support Node <10 and ESLint <6.","severity":"deprecated","affected_versions":"<0.4.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 --save-dev eslint-plugin-no-use-extend-native' and ensure package.json includes it.","cause":"Plugin not installed or wrong import path.","error":"Error: Failed to load plugin 'no-use-extend-native' declared in 'plugins': Cannot find module 'eslint-plugin-no-use-extend-native'"},{"fix":"Switch to eslint.config.js and import the plugin as shown in Quickstart.","cause":"Using deprecated .eslintrc config format with flat config plugin.","error":"ESLint couldn't determine the plugin name from ESLint configuration: 'no-use-extend-native'"},{"fix":"Use ESM import syntax: import eslintPluginNoUseExtendNative from 'eslint-plugin-no-use-extend-native'","cause":"Using require() instead of import in ESM-only context.","error":"Parsing error: The keyword 'import' is reserved"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}