{"id":19424,"library":"create-eslint-index","title":"create-eslint-index","description":"Simplify the creation of an index file for your ESLint plugin. Version 1.0.0 is stable, with no recent updates. It helps generate recommended configurations and rule descriptions from rule metadata. Key differentiators: automates index generation for ESLint plugins, extracts metadata like recommended severity and descriptions. Requires Node >=4.0.0 and typically used with req-all library to load rules.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/jfmengels/create-eslint-index","tags":["javascript","eslint","eslintplugin","helper","index"],"install":[{"cmd":"npm install create-eslint-index","lang":"bash","label":"npm"},{"cmd":"yarn add create-eslint-index","lang":"bash","label":"yarn"},{"cmd":"pnpm add create-eslint-index","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CommonJS only; no ESM or default export.","wrong":"","symbol":"createIndex","correct":"const createIndex = require('create-eslint-index')"},{"note":"Requires both settings and rules objects.","wrong":"createIndex.createConfig(settings) (missing rules argument)","symbol":"createConfig","correct":"createIndex.createConfig(settings, rules)"},{"note":"Returns a string for use in README injection.","wrong":"","symbol":"createRulesDescription","correct":"createIndex.createRulesDescription(settings, rules)"}],"quickstart":{"code":"const createIndex = require('create-eslint-index');\nconst reqAll = require('req-all');\nconst rules = reqAll('rules', {camelize: false});\nconst recommendedRules = createIndex.createConfig({ plugin: 'myplugin', path: 'meta.docs.recommended' }, rules);\nmodule.exports = { rules, configs: { recommended: { rules: recommendedRules } } };","lang":"javascript","description":"Demonstrates creating a recommended config from all rules in a directory."},"warnings":[{"fix":"Ensure the path is correct and that the rule objects have the field at that path.","message":"settings.path must exactly match the dot-notation path to the recommended severity field (e.g., 'meta.docs.recommended'). A typo will silently produce an empty config.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use rule names as keys, e.g., 'rule-1' not 'myplugin/rule-1'.","message":"The rules object keys must be the rule names (without plugin prefix). createConfig prepends the plugin name automatically.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure all rules have the required metadata or validate before calling createConfig.","message":"The function createConfig does not throw if a rule lacks the specified recommended field; it simply omits that rule from output.","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":"Double-check the path string and that your rule exports follow the correct format (meta.docs.recommended).","cause":"The path in settings.path is incorrect, or the rule object does not have meta.docs.recommended.","error":"TypeError: Cannot read property 'recommended' of undefined"},{"fix":"Use const createIndex = require('create-eslint-index') then call createIndex.createConfig().","cause":"Incorrect import: using destructuring or wrong module path.","error":"createIndex.createConfig is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}