Registry / testing / create-eslint-index

create-eslint-index

JSON →
library1.0.0jsnpmunverified

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.

npm install create-eslint-index
INSTALL
IMPORT
SIG · CREATE-ESLINT-INDE
C
create-eslint-index
testingjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createIndex
const createIndex = require('create-eslint-index')
CommonJS only; no ESM or default export.
createConfig
createIndex.createConfig(settings, rules)
createIndex.createConfig(settings) (missing rules argument)
Requires both settings and rules objects.
createRulesDescription
createIndex.createRulesDescription(settings, rules)
Returns a string for use in README injection.

Demonstrates creating a recommended config from all rules in a directory.

const createIndex = require('create-eslint-index'); const reqAll = require('req-all'); const rules = reqAll('rules', {camelize: false}); const recommendedRules = createIndex.createConfig({ plugin: 'myplugin', path: 'meta.docs.recommended' }, rules); module.exports = { rules, configs: { recommended: { rules: recommendedRules } } };
Debug
Known issues
gotchasettings.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.
fix
Ensure the path is correct and that the rule objects have the field at that path.
affects: >=1.0.0
gotchaThe rules object keys must be the rule names (without plugin prefix). createConfig prepends the plugin name automatically.
fix
Use rule names as keys, e.g., 'rule-1' not 'myplugin/rule-1'.
affects: >=1.0.0
gotchaThe function createConfig does not throw if a rule lacks the specified recommended field; it simply omits that rule from output.
fix
Ensure all rules have the required metadata or validate before calling createConfig.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: Cannot read property 'recommended' of undefined
The path in settings.path is incorrect, or the rule object does not have meta.docs.recommended.
fix
Double-check the path string and that your rule exports follow the correct format (meta.docs.recommended).
createIndex.createConfig is not a function
Incorrect import: using destructuring or wrong module path.
fix
Use const createIndex = require('create-eslint-index') then call createIndex.createConfig().
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
11
OpenAI (training)
1
Resources
create-eslint-index — npm install create-eslint-index · libregistry