Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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],
Comment | File | Size | Author |
---|---|---|---|
#15 | 2923747-wrong_declaration_backport.patch | 371 bytes | morsok |
#6 | 2923747-wrong_declaration.patch | 410 bytes | morsok |
Comments
Comment #2
morsokComment #3
morsokComment #4
GrandmaGlassesRopeManComment #6
morsokComment #7
morsokComment #8
GrandmaGlassesRopeManThis is a mistake in our original implementation of our rule overrides. ➕1️⃣ ✌️
Comment #10
xjmHEAD:
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!
Comment #11
xjmCorrect status.
Comment #14
xjmI 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.
Comment #15
morsokThis patch should do the trick.
Comment #16
morsokComment #18
johnzzonPatch in #15 works perfectly for me.
Comment #19
s_leu CreditAttribution: s_leu at Station commentedThe patch doesn't apply anymore and needs a re-roll against 8.5.x-dev
Comment #20
tsega CreditAttribution: tsega commentedThis patch is no longer required checked in 8.5.1
Comment #24
nod_