Skip to content
Snippets Groups Projects
Commit a49daebe authored by Mark Banner's avatar Mark Banner
Browse files

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

parent 34d49c8b
No related branches found
No related tags found
No related merge requests found
......@@ -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,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 = [
...fs
.readFileSync(
path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt")
...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"
)
.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}`),
).map(p => `devtools/client/debugger/src/${p}`),
];
const httpTestingPaths = [
"**/*mixedcontent",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment