runESLintOnFilesWithOptions() — react Function Reference
Architecture documentation for the runESLintOnFilesWithOptions() function in index.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD e97458e0_015f_b4f9_7c67_9b36db9fa705["runESLintOnFilesWithOptions()"] b1f597ae_f3fe_afb3_1db0_0cfe6b8817c9["index.js"] e97458e0_015f_b4f9_7c67_9b36db9fa705 -->|defined in| b1f597ae_f3fe_afb3_1db0_0cfe6b8817c9 b76b637c_f50a_fc66_2eea_8b9c9b316858["runESLint()"] b76b637c_f50a_fc66_2eea_8b9c9b316858 -->|calls| e97458e0_015f_b4f9_7c67_9b36db9fa705 f2b494d9_dc82_2d3a_7ba4_d83f8d116852["intersect()"] e97458e0_015f_b4f9_7c67_9b36db9fa705 -->|calls| f2b494d9_dc82_2d3a_7ba4_d83f8d116852 style e97458e0_015f_b4f9_7c67_9b36db9fa705 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/eslint/index.js lines 18–62
async function runESLintOnFilesWithOptions(filePatterns, onlyChanged, options) {
const eslint = new ESLint(options);
const formatter = await eslint.loadFormatter();
if (onlyChanged && changedFiles === null) {
// Calculate lazily.
changedFiles = [...listChangedFiles()];
}
const finalFilePatterns = onlyChanged
? intersect(changedFiles, filePatterns)
: filePatterns;
const results = await eslint.lintFiles(finalFilePatterns);
if (options != null && options.fix === true) {
await ESLint.outputFixes(results);
}
// When using `ignorePattern`, eslint will show `File ignored...` warnings for any ignores.
// We don't care because we *expect* some passed files will be ignores if `ignorePattern` is used.
const messages = results.filter(item => {
if (!onlyChanged) {
// Don't suppress the message on a full run.
// We only expect it to happen for "only changed" runs.
return true;
}
const ignoreMessage =
'File ignored because of a matching ignore pattern. Use "--no-ignore" to override.';
return !(item.messages[0] && item.messages[0].message === ignoreMessage);
});
const errorCount = results.reduce(
(count, result) => count + result.errorCount,
0
);
const warningCount = results.reduce(
(count, result) => count + result.warningCount,
0
);
const ignoredMessageCount = results.length - messages.length;
return {
output: formatter.format(messages),
errorCount: errorCount,
warningCount: warningCount - ignoredMessageCount,
};
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does runESLintOnFilesWithOptions() do?
runESLintOnFilesWithOptions() is a function in the react codebase, defined in scripts/eslint/index.js.
Where is runESLintOnFilesWithOptions() defined?
runESLintOnFilesWithOptions() is defined in scripts/eslint/index.js at line 18.
What does runESLintOnFilesWithOptions() call?
runESLintOnFilesWithOptions() calls 1 function(s): intersect.
What calls runESLintOnFilesWithOptions()?
runESLintOnFilesWithOptions() is called by 1 function(s): runESLint.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free