style: Add new ESLint rule no-empty-string-for-ifbreak (#10172)

* Add new ESLint rule for ifBreak

* Fix for third argument

* Run fix with new rule

* Address review

* Fix

* Update no-empty-flat-contents-for-if-break.js

* Fix CI config

Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
Sosuke Suzukiandfisker Cheung authored and GitHub committed 2021-01-29 20:03:11 +09:00
1 parent c3a59148cf
commit 07b30645ec
9 files changed
+94 -7

No files matched your search

+1 -1
View File
@@ -186,7 +186,7 @@ function genericPrint(path, options, print) {
options.originalText[locEnd(node) - 1] !== ";"
? ""
: options.__isHTMLStyleAttribute && isLastNode(path, node)
? ifBreak(";", "")
? ifBreak(";")
: ";",
];
}