Style error information

https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md

How to Review

## 1. Apply Patch
## 2. Review Code Changes
## 3. Confirm no Code Standard Errors
yarn & yarn lint:core-js-passing
## 4.1 If `NO` errors, mark the issue as `Reviewed & tested by the community` (Don't be shy, we're all friendly)
## 4.2 If `HAS` errors, fix it and upload a new patch (Just do it and you can!!!)

Background

- #2912962: Step 1 JS codestyle: [meta] Fix JS coding standards in core

- We adapted the airbnb coding standard (#2815077: Adopt airbnb javascript style guide v14.1 as new baseline javascript coding standards for Drupal 8 core and contrib), but we are not fully compliant to it yet.

More Information

- Using ES6 in Core
https://www.drupal.org/node/2815083

- To find JS code standard errors stats
cd core/ && yarn & yarn lint:core-js-stats

Valuable Follow-up

- N/A

Comments

drpal created an issue. See original summary.

m1r1k’s picture

The issue with this one is because eslint-plugin-import does not work with module.exports = {} and how do we resolve this?
Ignoring this rule for nightwatch or move nightwatch config files to es6?
https://github.com/benmosher/eslint-plugin-import/issues/1124#issuecomme...

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

msankhala’s picture

PatashINotFound’s picture

Fixed by exporting module using named export.

sksanjoo2’s picture

Status: Active » Reviewed & tested by the community
Issue tags: +DrupalCampGoa2019, +dcg2019

Reviewed and add run commandyarn & yarn lint:core-js-passing and getting success ✨ Done in 2.77s.
success Already up-to-date.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: issue-2983380-js-codestyle-import-named.patch, failed testing. View results

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

sd9121’s picture

Assigned: Unassigned » sd9121
Issue tags: -JavaScript +JavaScript
sd9121’s picture

Assigned: sd9121 » Unassigned

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

sagarchauhan’s picture

Status: Needs work » Reviewed & tested by the community

As of now all the tests are passing, hence moving the issue to RTBC.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

The build for #5 is failing. The "build successful" message is misleading but it means that the tests were unable to run 😓

sagarchauhan’s picture

@lauriii do we need that patch for this issue? As such without #5 patch, the test mentioned in issue summary is passing. And that is how this issue is directed to be tested.
yarn & yarn lint:core-js-passing

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

idebr’s picture

Status: Needs work » Needs review
StatusFileSize
new384 bytes

It seems any violations of this lint rule were fixed in other issues. I re-enabled the rule in the eslint configuration.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems re-enabling the rule didn't break anything so think it should be fine.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 21: 2983380-21.patch, failed testing. View results

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

sagarchauhan’s picture

Status: Needs work » Needs review

The test failed randomly. Moving to RTBC Again

sagarchauhan’s picture

Status: Needs review » Reviewed & tested by the community

  • lauriii committed aff62cb3 on 11.x
    Issue #2983380 by idebr, PatashINotFound, sagarchauhan, alwaysworking:...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed aff62cb and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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