CodeVetter · Repo Unpack · Data flow
eslint/eslint
CLI arguments become constructor options and appended configuration overrides. File discovery resolves physical paths, while text linting uses a filename for configuration matching. Parsing produces language-owned source representations that rules turn into diagnostics and fix ranges. Results then pass through persistence, suppression, formatting, and exit-status decisions.
- translateOptions() turns globals, parser selection, CLI rules, plugins, and extensions into overrideConfig; fix/dry-run, ignores, cache, flags, and statistics become ESLint options.
- findFiles() resolves inputs against cwd, stats direct paths, loads configuration for explicit files, groups directory/glob searches, and deduplicates the resulting paths.
- ConfigLoader caches lookup promises by starting directory and configuration-array promises by config path, then replaces promises with resolved values for synchronous cached access.
- ParserService.parseSync() calls language.parse(), rejects promise results, creates SourceCode on success, and converts parse failures into severity-2 fatal diagnostics.
- JavaScript parsing requests locations, ranges, tokens, comments, visitor keys, and scope information; parseForESLint() can additionally return parser services and its own scope manager.
- runRules() derives severity/options and FileContext, registers rule selectors, traverses SourceCode synchronously, and forwards context.report() calls into FileReport.
- verifyText() converts verifyAndFix() output into LintResult with messages, suppressed messages, counts, optional fixed output, original source for unresolved problems, and optional timing statistics.
- Workers claim file indices through Atomics.add(), return indexed results through parentPort, and the controller restores input ordering before storing cache entries.