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:
1 parent
c3a59148cf
commit
07b30645ec
9 files changed
+94
-7
No files matched your search
@@ -186,7 +186,7 @@ function genericPrint(path, options, print) {
|
||||
options.originalText[locEnd(node) - 1] !== ";"
|
||||
? ""
|
||||
: options.__isHTMLStyleAttribute && isLastNode(path, node)
|
||||
? ifBreak(";", "")
|
||||
? ifBreak(";")
|
||||
: ";",
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user