forked from mirrors/gecko-dev
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:
parent
572b2bd7ba
commit
84e57ea707
2 changed files with 24 additions and 21 deletions
|
|
@ -218,6 +218,9 @@ toolkit/components/translation/cld2/
|
||||||
toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
|
toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
|
||||||
toolkit/modules/AppConstants.jsm
|
toolkit/modules/AppConstants.jsm
|
||||||
|
|
||||||
|
# Tests of ESLint command.
|
||||||
|
tools/lint/test/files
|
||||||
|
|
||||||
# Uses special template formatting.
|
# Uses special template formatting.
|
||||||
tools/tryselect/selectors/chooser/templates/chooser.html
|
tools/tryselect/selectors/chooser/templates/chooser.html
|
||||||
|
|
||||||
|
|
|
||||||
42
.eslintrc.js
42
.eslintrc.js
|
|
@ -22,28 +22,28 @@ function removeOverrides(config) {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ignorePatterns = [
|
function readFile(path) {
|
||||||
...fs
|
return fs
|
||||||
.readFileSync(
|
.readFileSync(path, { encoding: "utf-8" })
|
||||||
path.join(__dirname, "tools", "rewriting", "ThirdPartyPaths.txt")
|
|
||||||
)
|
|
||||||
.toString("utf-8")
|
|
||||||
.split("\n"),
|
|
||||||
...fs
|
|
||||||
.readFileSync(
|
|
||||||
path.join(
|
|
||||||
__dirname,
|
|
||||||
"devtools",
|
|
||||||
"client",
|
|
||||||
"debugger",
|
|
||||||
"src",
|
|
||||||
".eslintignore"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.toString("utf-8")
|
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.filter(p => p && !p.startsWith("#"))
|
.filter(p => p && !p.startsWith("#"));
|
||||||
.map(p => `devtools/client/debugger/src/${p}`),
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
)
|
||||||
|
).map(p => `devtools/client/debugger/src/${p}`),
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue