jenkins icon indicating copy to clipboard operation
jenkins copied to clipboard

discussion: Lint Jelly files?

Open janfaracik opened this issue 1 year ago • 13 comments

For discussion purposes -

How do we feel about linting Jelly? Currently nigh every other file is linted in Jenkins and this works well. I'd propose including Jelly in that too, I've tweaked .prettierrc to include Jelly files and the output seems to be quite sensible.

@jenkinsci/sig-ux

janfaracik avatar Nov 20 '23 16:11 janfaracik

No objections from me, if linting works consistently 👍

NotMyFault avatar Nov 23 '23 13:11 NotMyFault

Fine with me if you can get a green build

timja avatar Nov 23 '23 15:11 timja

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Nov 24 '23 22:11 github-actions[bot]

The linting is breaking something

timja avatar Nov 26 '23 21:11 timja

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Nov 28 '23 00:11 github-actions[bot]

So the tests are failing as certain xpath selectors are no longer valid due to the whitespace changes, e.g. Add parameter is now Add parameter.

This can be fixed by setting htmlWhitespaceSensitivity to strict, see https://prettier.io/docs/en/options.html#html-whitespace-sensitivity and https://prettier.io/blog/2018/11/07/1.15.0#whitespace-sensitive-formatting. This brings its own issues however as it seems to be mangling rss20.jelly and it's also no longer as opinionated.

janfaracik avatar Dec 11 '23 14:12 janfaracik

So the tests are failing as certain xpath selectors are no longer valid due to the whitespace changes, e.g. Add parameter is now Add parameter.

This can be fixed by setting htmlWhitespaceSensitivity to strict, see prettier.io/docs/en/options.html#html-whitespace-sensitivity and prettier.io/blog/2018/11/07/1.15.0#whitespace-sensitive-formatting. This brings its own issues however as it seems to be mangling rss20.jelly and it's also no longer as opinionated.

This normally fixes xpath that is that sensitive: https://developer.mozilla.org/en-US/docs/Web/XPath/Functions/normalize-space

timja avatar Dec 11 '23 16:12 timja

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Dec 13 '23 19:12 github-actions[bot]

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Mar 04 '24 14:03 github-actions[bot]

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Mar 14 '24 20:03 github-actions[bot]

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Mar 18 '24 14:03 github-actions[bot]

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Mar 26 '24 18:03 github-actions[bot]

Please take a moment and address the merge conflicts of your pull request. Thanks!

github-actions[bot] avatar Mar 28 '24 20:03 github-actions[bot]

Going to close this - there's too many oddities after linting sadly. Will investigate again in the future if there's a better way. Thanks to those that commented.

janfaracik avatar Jun 08 '24 11:06 janfaracik