From e03fe088c7b91082a580ac84ea6ae8820ed6e99f Mon Sep 17 00:00:00 2001 From: Butkovits Atila Date: Wed, 7 Sep 2022 11:52:01 +0300 Subject: [PATCH] Backed out changeset 44fb0e3f3843 (bug 1789249) for causing mozlint failures. CLOSED TREE --- .eslintignore | 3 --- .eslintrc.js | 40 ++++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.eslintignore b/.eslintignore index d1e876e516d1..536a29499a58 100644 --- a/.eslintignore +++ b/.eslintignore @@ -218,9 +218,6 @@ toolkit/components/translation/cld2/ toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js toolkit/modules/AppConstants.jsm -# Tests of ESLint command. -tools/lint/test/files - # Uses special template formatting. tools/tryselect/selectors/chooser/templates/chooser.html diff --git a/.eslintrc.js b/.eslintrc.js index b31653fdd693..a71a3a3b20f3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,28 +22,28 @@ function removeOverrides(config) { return config; } -function readFile(path) { - return fs - .readFileSync(path, { encoding: "utf-8" }) - .split("\n") - .filter(p => p && !p.startsWith("#")); -} - const ignorePatterns = [ - ...readFile( - path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt") - ), - ...readFile(path.join(__dirname, "tools", "rewriting", "Generated.txt")), - ...readFile( - path.join( - __dirname, - "devtools", - "client", - "debugger", - "src", - ".eslintignore" + ...fs + .readFileSync( + path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt") ) - ).map(p => `devtools/client/debugger/src/${p}`), + .toString("utf-8") + .split("\n"), + ...fs + .readFileSync( + path.join( + __dirname, + "devtools", + "client", + "debugger", + "src", + ".eslintignore" + ) + ) + .toString("utf-8") + .split("\n") + .filter(p => p && !p.startsWith("#")) + .map(p => `devtools/client/debugger/src/${p}`), ]; const httpTestingPaths = [ "**/*mixedcontent",