зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1280883 - Avoid effects of ASI when preprocessing XBL for eslint. r=miker
MozReview-Commit-ID: KozbJCGIpFo --HG-- extra : rebase_source : bd0fa2ff793391f0100b0310fa4f5d1680241e33
This commit is contained in:
Родитель
ed64617115
Коммит
4ceb6d2129
|
@ -261,10 +261,13 @@ module.exports = {
|
|||
}
|
||||
|
||||
addSyntheticLine(indent(3) + `get ${item.attributes.name}() {`, item.textLine);
|
||||
// TODO This will probably break some style rules when. We need
|
||||
// to inject this next to the first non-whitespace character
|
||||
addSyntheticLine(indent(4) + `return`, item.textLine);
|
||||
addNodeLines(item, 4);
|
||||
addSyntheticLine(indent(4) + `return (`, item.textLine);
|
||||
|
||||
// Remove trailing semicolons, as we are adding our own
|
||||
item.textContent = item.textContent.replace(/;(?=\s*$)/, "");
|
||||
addNodeLines(item, 5);
|
||||
|
||||
addSyntheticLine(indent(4) + `);`, item.textLine);
|
||||
addSyntheticLine(indent(3) + `},`, item.textEndLine);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "eslint-plugin-mozilla",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
|
||||
"keywords": [
|
||||
"eslint",
|
||||
|
|
Загрузка…
Ссылка в новой задаче