Bug 1478305 - For xpcshell-test head files, limit checking no-unused-vars to the local scope only. r=mossop

MozReview-Commit-ID: 2m37fyF6YwD

--HG--
extra : rebase_source : 523876c41599975199158700d7d53f096d25215c
This commit is contained in:
Mark Banner 2018-07-30 11:14:54 +01:00
Родитель 8b155b06b1
Коммит 3fa6f1c498
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -64,6 +64,20 @@ module.exports = {
"uneval": false
},
"overrides": [{
// If it is a head file, we turn off global unused variable checks, as it
// would require searching the other test files to know if they are used or not.
// This would be expensive and slow, and it isn't worth it for head files.
// We could get developers to declare as exported, but that doesn't seem worth it.
"files": "head*.js",
"rules": {
"no-unused-vars": ["error", {
"args": "none",
"vars": "local"
}]
}
}],
rules: {
"mozilla/import-headjs-globals": "error",
"mozilla/mark-test-function-used": "error",