{"id":25516,"library":"eslint-plugin-lint","title":"eslint-plugin-lint","description":"Load arbitrary ESLint rules from multiple directories into a single namespace (lint/). Version 1.0.0 is the current stable release; the package is quite stable with no frequent releases. It differentiates from alternatives like eslint-plugin-rulesdir by supporting multiple rule directories simultaneously, and from eslint-plugin-local-rules by offering a simple API and not requiring a specific configuration structure. It works with Node.js >=4 and is intended for use in ESLint configurations to merge custom rules from various sources into one plugin namespace.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/zertosh/eslint-plugin-lint","tags":["javascript","eslint","eslint-plugin"],"install":[{"cmd":"npm install eslint-plugin-lint","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-lint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package exports a function `load` but no named exports. Must use require() or import the default with `import plugin from 'eslint-plugin-lint'`.","symbol":"default","correct":"const plugin = require('eslint-plugin-lint');"},{"note":"load is a method on the default export. In CJS, you must require the module and call .load directly. In ESM, use 'import plugin from ...; plugin.load(...)'.","wrong":"const { load } = require('eslint-plugin-lint'); // exports are not an object; load is a property of the default export","symbol":"load","correct":"require('eslint-plugin-lint').load(...)"}],"quickstart":{"code":"// In your .eslintrc.js\nconst path = require('path');\nrequire('eslint-plugin-lint').load(\n  path.join(__dirname, 'my-rules'),\n  path.join(__dirname, 'their-rules')\n);\nmodule.exports = {\n  plugins: ['lint'],\n  rules: {\n    'lint/no-foo': 'warn',\n    'lint/no-bar': 'error'\n  }\n};","lang":"javascript","description":"Shows how to configure ESLint to load custom rules from two directories and reference them under the lint/ namespace."},"warnings":[{"fix":"Use path.join(__dirname, 'relative/path') to resolve to an absolute path.","message":"Paths passed to load() must be absolute to avoid resolution issues with cwd.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure each rule file exports an object with meta and create properties.","message":"Rule files must have a .js extension and export a valid ESLint rule object.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always reference rules as 'lint/rule-name' and add 'lint' to plugins array.","message":"Plugin name is fixed as 'lint'; you cannot rename the namespace.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Call load() at the top level of your .eslintrc.js or config file.","message":"load() must be called before ESLint config is evaluated; it modifies global state.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-plugin-lint --save-dev' from the project root.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'eslint-plugin-lint'"},{"fix":"Add 'lint' to the plugins array in your ESLint configuration.","cause":"Missing 'lint' in plugins array of ESLint config.","error":"ESLint couldn't find the plugin \"eslint-plugin-lint\"."},{"fix":"Ensure 'no-foo.js' exists in one of the directories passed to load() and the rule name uses the filename without extension.","cause":"Rule file not in the loaded directories or filename mismatch.","error":"Definition for rule 'lint/no-foo' was not found."},{"fix":"Export an object with 'meta' and 'create' from the rule file.","cause":"Rule file does not export a valid ESLint rule (object with create).","error":"Failed to load rule 'lint/no-bar': Rule is not a function."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}