Skip to content

Commit

Permalink
Bug 1465476 - Support binary expressions for globals evaluation in ES…
Browse files Browse the repository at this point in the history
…Lint. r=mossop

MozReview-Commit-ID: 66g1ISJ2ML1

--HG--
extra : rebase_source : bb7a61710467dbbae81c6d654d409453edf729f8
  • Loading branch information
Standard8 committed May 30, 2018
1 parent b3e0d71 commit 7f558bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ module.exports = {
case "AssignmentExpression":
return this.getASTSource(node.left) + " = " +
this.getASTSource(node.right);
case "BinaryExpression":
return this.getASTSource(node.left) + " " + node.operator + " " + this.getASTSource(node.right);
default:
throw new Error("getASTSource unsupported node type: " + node.type);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/lint/eslint/eslint-plugin-mozilla/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/lint/eslint/eslint-plugin-mozilla/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-mozilla",
"version": "0.13.0",
"version": "0.13.1",
"description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
"keywords": [
"eslint",
Expand Down

0 comments on commit 7f558bc

Please sign in to comment.