summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/cli-engine/cli-engine.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-10-25 12:48:14 -0700
committercjihrig <cjihrig@gmail.com>2019-10-28 09:51:24 -0400
commit511f67bcb42b59c9a3a3efab8fed578db100afe1 (patch)
tree8b64f390dd727dd739fd2fb84d69df3c829a9315 /tools/node_modules/eslint/lib/cli-engine/cli-engine.js
parentb35181f877d5a92e8bb52eb071489f2a7d87494b (diff)
downloadandroid-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.gz
android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.bz2
android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.zip
tools: update ESLint to 6.6.0
Update ESLint to 6.6.0 PR-URL: https://github.com/nodejs/node/pull/30123 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/cli-engine/cli-engine.js')
-rw-r--r--tools/node_modules/eslint/lib/cli-engine/cli-engine.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js
index 3c67d33daa..8afd262708 100644
--- a/tools/node_modules/eslint/lib/cli-engine/cli-engine.js
+++ b/tools/node_modules/eslint/lib/cli-engine/cli-engine.js
@@ -145,7 +145,7 @@ function validateFixTypes(fixTypes) {
/**
* It will calculate the error and warning count for collection of messages per file
- * @param {LintMessage[]} messages - Collection of messages
+ * @param {LintMessage[]} messages Collection of messages
* @returns {Object} Contains the stats
* @private
*/
@@ -173,7 +173,7 @@ function calculateStatsPerFile(messages) {
/**
* It will calculate the error and warning count for collection of results from all files
- * @param {LintResult[]} results - Collection of messages from all the files
+ * @param {LintResult[]} results Collection of messages from all the files
* @returns {Object} Contains the stats
* @private
*/
@@ -272,8 +272,8 @@ function verifyText({
/**
* Returns result with warning by ignore settings
- * @param {string} filePath - File path of checked code
- * @param {string} baseDir - Absolute path of base directory
+ * @param {string} filePath File path of checked code
+ * @param {string} baseDir Absolute path of base directory
* @returns {LintResult} Result with single warning
* @private
*/
@@ -387,7 +387,6 @@ function isErrorMessage(message) {
* name will be the `cacheFile/.cache_hashOfCWD`
*
* if cacheFile points to a file or looks like a file then in will just use that file
- *
* @param {string} cacheFile The name of file to be used to store the cache
* @param {string} cwd Current working directory
* @returns {string} the resolved path to the cache file
@@ -568,7 +567,7 @@ class CLIEngine {
});
const lintResultCache =
options.cache ? new LintResultCache(cacheFilePath) : null;
- const linter = new Linter();
+ const linter = new Linter({ cwd: options.cwd });
/** @type {ConfigArray[]} */
const lastConfigArrays = [configArrayFactory.getConfigArrayForFile()];
@@ -668,11 +667,14 @@ class CLIEngine {
addPlugin(name, pluginObject) {
const {
additionalPluginPool,
- configArrayFactory
+ configArrayFactory,
+ lastConfigArrays
} = internalSlotsMap.get(this);
additionalPluginPool.set(name, pluginObject);
configArrayFactory.clearCache();
+ lastConfigArrays.length = 1;
+ lastConfigArrays[0] = configArrayFactory.getConfigArrayForFile();
}
/**