From 71f8d841290f9a9cec743c9c21a4b5908d53e335 Mon Sep 17 00:00:00 2001 From: Hamza Hamidi Date: Thu, 21 May 2020 22:08:29 +0200 Subject: [PATCH] Revert "Feat(Eslint): Upgrade to Eslint 6 (#254)" (#336) This reverts commit 47acf7c6f88690ecb8a417404fb66bd74b1e0509. --- package.json | 2 +- src/__tests__/index.js | 4 +--- src/utils.js | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9024aaf..bd74f0c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "common-tags": "^1.4.0", "core-js": "^3.1.4", "dlv": "^1.1.0", - "eslint": "^6.5.1", + "eslint": "^5.0.0", "indent-string": "^4.0.0", "lodash.merge": "^4.6.0", "loglevel-colored-level-prefix": "^1.0.0", diff --git a/src/__tests__/index.js b/src/__tests__/index.js index 535026a..6cc26eb 100644 --- a/src/__tests__/index.js +++ b/src/__tests__/index.js @@ -353,10 +353,8 @@ test('reads text from fs if filePath is provided but not text', () => { format({ filePath }); // format({filePath}).catch(() => {}) // one hit to get the file and one for the eslintignore - expect(fsMock.readFileSync).toHaveBeenCalledTimes(3); + expect(fsMock.readFileSync).toHaveBeenCalledTimes(2); expect(fsMock.readFileSync).toHaveBeenCalledWith(filePath, 'utf8'); - const eslintIgnoreCall = fsMock.readFileSync.mock.calls[1][0]; - expect(eslintIgnoreCall.includes('.eslintignore')).toBeTruthy(); }); test('logs error if it cannot read the file from the filePath', () => { diff --git a/src/utils.js b/src/utils.js index d97d259..acfa3d5 100644 --- a/src/utils.js +++ b/src/utils.js @@ -75,7 +75,7 @@ function getOptionsForFormatting( } function getRelevantESLintConfig(eslintConfig, eslintPath) { - const cliEngine = getESLintCLIEngine(eslintPath, { ignore: false }); + const cliEngine = getESLintCLIEngine(eslintPath); // TODO: Actually test this branch // istanbul ignore next const loadedRules =