New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address eslint across all JS files #6974
Conversation
d2d9a69
to
2cf1804
Compare
If we add it to the root directory, can we get a rid of the config in the war directory? |
Thanks, I meant to do that, fixed in ee970ee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All code changed in this PR uses two space indentation, despite files currently (mostly?) being indented with four spaces. This introduces mixed indentation which makes no sense.
continue; | ||
} | ||
if (e.tagName == "FIELDSET") | ||
continue; | ||
{continue;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manually fixed all the ones I found, it's what eslint did with the --fix
. I will fix this
Can we wait for the prettier PR to address that, I said this in the description:
(which may not have been clear but yes every edit was somewhat difficult to stay consistent with the inconsistent formatting, this was asked for as a pre-cursor to #6863 to fix some issues with formatting by applying braces consistently.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! I think this will systematically address Wadeck's concern from the other PR. 👍
I did not review each line for correctness, since I am not a JavaScript programmer. I simply trust that you did the lint fixes correctly.
I agree that the indentation of this PR is not all that important if we plan to auto-format the files afterward anyway. The main goal of this PR, in my mind, is to prepare for the auto-formatting step by structuring the input such that the auto-formatting step can create the best possible output.
Thanks, I didn't make the connection that this refers to the inconsistent indentation introduced here. However,
This looks a lot like both changes should be a single PR, since neither can stand alone without the other? AFAIUI, this one needs the other for indentation to not be a giant inconsistent mess, and the other needs this one to produce tolerable results? (Also, I would expect that both may create conflicts in open PRs, at least ones involving existing JS files, so I'd rather not have the bot request merge conflict resolution while the other PR is still pending.) |
Previously it was just looking at war/
If that's the preferred option then I can include in #6863 Pushed as https://github.com/jenkinsci/jenkins/pull/6863/commits (there was an incompatibility in this PR that affected the prettier one, moving the eslint config file to the root prevented loading a package from the war directory so I reverted moving it and passed the config file explicitly so it didn't try look up another one) I've kept this PR open in case it's preferred to merge this separately |
If we are going to squash #6863 (as we usually do) then I would prefer for this PR to be (squash) merged separately so that the final state is two distinct commits, as I feel this change is different enough from #6863 (automatically applied vs manual changes) that I would want to be able to view them separately when reading the history. But if we plan to merge #6863 as multiple commits (which we may very well want to do in order to make it easier to cherry-pick the non-automatic portions onto backport branches), then this concern does not apply. |
I do not plan to squash merge the prettier PR, it has 3 very distinct commits. personally I would prefer to merge this separately, it’s trivial to fix prettier conflicts as you can apply the automated changes, but if conflicts appear with the prettier changes and this PR it will be more difficult. although I’m not expecting many conflicts from this PR |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
Closing in favor of #6863. |
Previously it was just looking at the
war
moduleSee #6863 (comment)
Testing done
This should be safe although 95% of changes were all manual,
--fix
wasn't much help here.I manually cleaned up some styling issues introduced by
--fix
, consistent styling will be applied by #6863Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgrade@Restricted
or have@since TODO
Javadoc, as appropriate.@Deprecated(since = "TODO")
or@Deprecated(forRemoval = true, since = "TODO")
if applicable.eval
to ease future introduction of Content-Security-Policy directives (see documentation on jenkins.io).Desired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are accurate, human-readable, and in the imperative moodupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).