Skip to content
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

IBX-1007: [Admin UI] As a developer I want to have js code style used in code #336

Merged
merged 14 commits into from
Mar 1, 2022

Conversation

GrabowskiM
Copy link
Contributor

Question Answer
Tickets https://issues.ibexa.co/projects/IBX/issues/IBX-1007
Bug fix? no
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? yes/no
License GPL-2.0

Related:
ibexa/eslint-config-ibexa#5

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

Comment on lines 3 to 4
const { hasAsset } = toggleForm.dataset;
const { hasUniqueAsset } = toggleForm.dataset;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { hasAsset } = toggleForm.dataset;
const { hasUniqueAsset } = toggleForm.dataset;
const { hasAsset, hasUniqueAsset } = toggleForm.dataset;

Comment on lines 4 to 7
const { contentDraftEditUrl } = event.currentTarget.dataset;
const { versionHasConflictUrl } = event.currentTarget.dataset;
const { contentId } = event.currentTarget.dataset;
const { languageCode } = event.currentTarget.dataset;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { contentDraftEditUrl } = event.currentTarget.dataset;
const { versionHasConflictUrl } = event.currentTarget.dataset;
const { contentId } = event.currentTarget.dataset;
const { languageCode } = event.currentTarget.dataset;
const { contentDraftEditUrl, versionHasConflictUrl, contentId, languageCode } = event.currentTarget.dataset;

onConfirm: confirmHandler,
onCancel: cancelHandler,
});
const mergedConfig = { ...config, onConfirm: confirmHandler,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const mergedConfig = {
  ...config,
  onConfirm: confirmHandler,
  onCancel: cancelHandler,
};

?? :)

@@ -30,15 +29,13 @@
btn.addEventListener(
'click',
() => {
const actions = doc.querySelector(`.ibexa-extra-actions[data-actions="${btn.dataset.actions}"]`);if (btn.dataset.validate && !parseInt(btn.dataset.isFormValid, 10)) {
const actions = doc.querySelector(`.ibexa-extra-actions[data-actions="${btn.dataset.actions}"]`); if (btn.dataset.validate && !parseInt(btn.dataset.isFormValid, 10)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const actions = doc.querySelector(`.ibexa-extra-actions[data-actions="${btn.dataset.actions}"]`); if (btn.dataset.validate && !parseInt(btn.dataset.isFormValid, 10)) {
const actions = doc.querySelector(`.ibexa-extra-actions[data-actions="${btn.dataset.actions}"]`);
if (btn.dataset.validate && !parseInt(btn.dataset.isFormValid, 10)) {

'X-CSRF-Token': token,
}),
headers: { ...HEADERS_CREATE_VIEW, 'X-Siteaccess': siteaccess,
'X-CSRF-Token': token },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 headers: {
    ...HEADERS_CREATE_VIEW,
    "X-Siteaccess": siteaccess,
    "X-CSRF-Token": token,
 },

?

@dew326 dew326 merged commit 9319626 into main Mar 1, 2022
@dew326 dew326 deleted the IBX-1007-linter branch March 1, 2022 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants