Bug 1789249 - ESLint should ignore files listed in Generated.txt, and ESLint linter tests. r=mossop

Differential Revision: https://phabricator.services.mozilla.com/D156457
This commit is contained in:
Mark Banner 2022-09-09 18:46:38 +00:00
Родитель 34d49c8bb3
Коммит a49daebe0d
2 изменённых файлов: 24 добавлений и 21 удалений

Просмотреть файл

@ -218,6 +218,9 @@ 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

Просмотреть файл

@ -22,15 +22,19 @@ function removeOverrides(config) {
return config;
}
function readFile(path) {
return fs
.readFileSync(path, { encoding: "utf-8" })
.split("\n")
.filter(p => p && !p.startsWith("#"));
}
const ignorePatterns = [
...fs
.readFileSync(
...readFile(
path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt")
)
.toString("utf-8")
.split("\n"),
...fs
.readFileSync(
),
...readFile(path.join(__dirname, "tools", "rewriting", "Generated.txt")),
...readFile(
path.join(
__dirname,
"devtools",
@ -39,11 +43,7 @@ const ignorePatterns = [
"src",
".eslintignore"
)
)
.toString("utf-8")
.split("\n")
.filter(p => p && !p.startsWith("#"))
.map(p => `devtools/client/debugger/src/${p}`),
).map(p => `devtools/client/debugger/src/${p}`),
];
const httpTestingPaths = [
"**/*mixedcontent",