CodeVetter · Repo Unpack · Extension points
eslint/eslint
Extension is centered on flat configuration and explicit plugin objects. Rules, languages, processors, and parsers connect at different stages of verification. Formatters extend the output boundary, while configuration helpers and feature flags provide additional integration surfaces. Built-in rules are registered lazily and follow the same metadata/create contract used by rule tests.
- New built-in rules enter the alphabetized LazyLoadingRuleMap in lib/rules/index.js; defaultConfig exposes that map through a proxy under the internal '@' plugin.
- Rule modules provide create(context) and metadata; runRules() rejects missing create(), requires meta.fixable for emitted fixes, and requires meta.hasSuggestions for suggestions.
- Plugin rule IDs resolve through config.plugins[pluginName].rules[ruleName]; CLI --plugin normalizes package names and registers default exports under shorthand names.
- Language plugins register under plugins[namespace].languages[name]; Config merges defaults, validates languageOptions, and optionally normalizes them before parsing.
- Custom JavaScript parsers may implement parseForESLint() or parse(); enhanced parser results can supply services, visitor keys, and scopeManager.
- Processors can be plugin-qualified names or objects; verification uses preprocess/postprocess and disables fixes unless supportsAutofix is true.
- Custom formatters are dynamically imported functions from paths or eslint-formatter packages; their wrapper sorts results and supplies contextual/rule metadata.
- eslint/config re-exports defineConfig(), globalIgnores(), and includeIgnoreFile(); behavior experiments register in activeFlags/inactiveFlags, including unstable_native_nodejs_ts_config.