Problem/Motivation

Currently eslint outputs the following warning for every linted js file :

warning Definition for rule 'no-mutable-exports' was not found no-mutable-exports

This is because in eslintrc.json the "no-mutable-exports": [1], declaration in the rules block is wrong.

Proposed resolution

When using rules from a modules, the rule name must be prefixed with the module name, the line should read :

"import/no-mutable-exports": [1],

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

morsok created an issue. See original summary.

morsok’s picture

Issue summary: View changes
morsok’s picture

GrandmaGlassesRopeMan’s picture

Status: Active » Needs review
Issue tags: +JavaScript

Status: Needs review » Needs work

The last submitted patch, 3: 2923747-wrong_declaration.patch, failed testing. View results

morsok’s picture

FileSize
410 bytes
morsok’s picture

Status: Needs work » Needs review
GrandmaGlassesRopeMan’s picture

Status: Needs review » Reviewed & tested by the community

This is a mistake in our original implementation of our rule overrides. ➕1️⃣ ✌️

  • xjm committed df5ddd2 on 8.5.x
    Issue #2923747 by morsok, drpal: Wrong declaration of no-mutable-exports...
xjm’s picture

Version: 8.5.x-dev » 8.4.x-dev

HEAD:

[ibnsina:core | Fri 15:18:36] $ yarn run lint:core-js
yarn run v1.2.1
$ node ./node_modules/eslint/bin/eslint.js --ext=.es6.js . || exit 0

/Users/xjm/git/maintainer/core/misc/active-link.es6.js
  6:1  warning  Definition for rule 'no-mutable-exports' was not found  no-mutable-exports
  6:2  warning  Unexpected unnamed function                             func-names

Patch: no "mutable" in the output.

Committed and pushed to 8.5.x!

@drpal and I also discussed the backport of this. Since this throws an error on every lint I think it makes sense to remove the invalid rule name. However, this is effectively adding a "new" rule by correcting the name to the correct name, which is a disruptive change under https://www.drupal.org/core/d8-allowed-changes#minor.

So, can we get a backport that just removes the invalid rule, rather than changing it to the valid one? Thanks!

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Correct status.

  • xjm committed a0342fb on 8.4.x
    Issue #2923747 by morsok, drpal: Wrong declaration of no-mutable-exports...

  • xjm committed 8d99066 on 8.4.x
    Revert "Issue #2923747 by morsok, drpal: Wrong declaration of no-mutable...
xjm’s picture

I was wondering how it was that I didn't push this commit, except turns out what I didn't push was a cherry-pick despite #10. So that's the revert message; this is still in 8.5.x.

morsok’s picture

So, can we get a backport that just removes the invalid rule, rather than changing it to the valid one? Thanks!

This patch should do the trick.

morsok’s picture

Status: Needs work » Needs review

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

johnzzon’s picture

Patch in #15 works perfectly for me.

s_leu’s picture

Status: Needs review » Needs work

The patch doesn't apply anymore and needs a re-roll against 8.5.x-dev

tsega’s picture

This patch is no longer required checked in 8.5.1

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

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should 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.

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

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.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.

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

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should 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.

nod_’s picture

Status: Needs work » Closed (works as designed)
Issue tags: -JavaScript +JavaScript