ESlint returns errors.
See CI pipeline for more details.

Issue fork shorthand-3452121

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

VladimirAus created an issue. See original summary.

deepak5423 made their first commit to this issue’s fork.

vladimiraus’s picture

Status: Active » Needs work
vladimiraus’s picture

vladimiraus’s picture

Title: Gitlab CI: fix eslint » Gitlab CI: fix eslint & stylelint
deepak5423’s picture

Status: Needs work » Needs review

please review

vladimiraus’s picture

Status: Needs review » Needs work

Merge error. Make sure to pull 4.0.x branch

git pull origin 4.0.x

and resolve conflicts.

deepak5423’s picture

Status: Needs work » Needs review

please review

tirupati_singh’s picture

Status: Needs review » Reviewed & tested by the community

Hi, as there is no eslint issues and pipeline is Green for eslint hence moving the issue status to RTBC.

vladimiraus’s picture

Status: Reviewed & tested by the community » Needs work
  • New JS functionality are not explained or commented.
  • JS: function moved but no comments added.
  • eslint is still in red.
vladimiraus’s picture

Title: Gitlab CI: fix eslint & stylelint » Gitlab CI: fix eslint & cspell fix
vladimiraus’s picture

Status: Needs work » Needs review
vladimiraus’s picture

Title: Gitlab CI: fix eslint & cspell fix » Gitlab CI: fix stylelint, eslint & cspell fix
jannakha’s picture

Status: Needs review » Reviewed & tested by the community

Changes look good.
Tested.
Ready for release.

Thanks for your contribution!

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Committed! Thank you all! 🍻

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

paulmartin84’s picture

This has broken the shorthand module completely and stories can no longer be selected.

if (option.value == 0) {

was changed to:

if (option.value === 0) {

However the zero is actually a string so now it fails to be excluded and then causes the following error
TypeError: Cannot read properties of undefined (reading 'description'), so either need to be changed back or changed to === '0'

While this part is being addressed, we shouldn't be excluding zero anyway. Once a story has been selected, there is currently no way to unselect all stories and set it back to 0 The field doesn't have to be set as a a required nor should it have to be be.

The code also has a hardcoded field name in it, which is just not acceptable in a Drupal module. Users should be free to name their fields as they wish.

I'll create a new issue for all of the above, but just putting it here, incase people are wondering why this issue has broken something

vladimiraus’s picture

Thanks for reporting @paulmartin84.
Committing now.