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.
The ESLint config uses '2' for errors, '1' for warnings, and '0' to turn off a rule. Instead of numbers, we can use the more readable 'error' for errors, 'warn' for warnings, and 'off' to turn off a rule.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2877441-7.patch | 6.22 KB | jofitz |
#2 | more-readable-eslint-config-2877441-2.patch | 6.22 KB | fafnirical |
Comments
Comment #2
fafniricalComment #3
fafniricalComment #6
borisson_I agree that this is a good idea. The patch needs a reroll though.
Comment #7
jofitz CreditAttribution: jofitz at ComputerMinds commentedRe-rolled.
Comment #8
marxjohnson CreditAttribution: marxjohnson as a volunteer commentedI've reviewed this and both files look good. I was momentarily confused as to why
"max-nested-callbacks": ["warn", 3],
still had a 3 instead of a word, but on closer inspection that's the number of nested callbacks allowed, and not another eslint reporting level.I also ran eslint on a file before and after the patch, the output was the same in both cases.
Comment #9
justafishAlso reviewed - looks good. Great idea 👍
Comment #10
alexpottCrediting @marxjohnson for an rtbc review which details all the steps taken and their thoughts whilst reviewing the patch.
Comment #11
alexpottCommitted 99f215b and pushed to 8.6.x. Thanks!