apply Prettier formatting --no-semi in test only#123
Conversation
karfau
left a comment
There was a problem hiding this comment.
I would review this once the conflicts have been resolved. (I think it's important to not change spacing inside inline (multiline) XML test snippets, but I'm not sue such cases exist.)
|
I just resolved the conflicts (with a little bit of a trick). I am not sure if I follow your concern, would definitely appreciate if you can point out an example in case the unwanted spacing happens. Thanks! |
| var libxml = require('libxmljs') | ||
| } catch (e) { | ||
| var DomJS = require('dom-js') |
There was a problem hiding this comment.
We should also get rid of this file. But not in this PR of course.
karfau
left a comment
There was a problem hiding this comment.
I think it's all right.
Looking forward to get rid of all those strange non-sense files.
|
I think it would be good to raise one or more issues to track the loose ends that we identified here. I will likely merge this later tonight. Thanks to @karfau for the timely review. |
| error.push(msg) | ||
| }, | ||
| }).parseFromString(faulty, 'text/xml') | ||
| Array.from(['warn', 'warning', 'error', 'fatalError']).forEach((k) => { |
There was a problem hiding this comment.
FYI I used Array.from here, as a trick to avoid the automatic semicolon insertion (ASI) by Prettier.
We should probably add some blank lines to this test case as well.
This proposal introduces Prettier for formatting with tabs & no semicolons in test only.
I am basically splitting this out from PR #120.
I would like to apply this formatting to the
libcode as well, once we further improve the test coverage as discussed in #72.It would be ideal if we could do this before making the 0.4.0 release discussed in #99.
P.S. I would like to note how the formatting decisions were made in
.prettierrc.yaml:xmltestcontribution in PR test: Add jest testsuite withxmltestcases #112