See https://integration.wikimedia.org/ci/job/mwgate-node10-docker/9527/console
We seem to be inheriting the upstream Wikimedia eslint configuration for the no-restricted-syntax rule. This currently forbids some methods like Array.prototype.includes for browser compatibility reasons. That makes sense for mediawiki, but we are transforming/polyfilling our code and these methods should be allowed.
Options to resolve this problem are:
1: disable eslint for the offending syntax in our code
2: not checking 'no-restricted-syntax' rule
3: modifying 'no-restricted-syntax' rule locally
4: not extending 'wikimedia/language/es6'
5: changing upstream so that the extra rules for "es6+" are separate from
the rules for "nothing new than es6"
Since changing this upstream can be a longer process, option 5 cannot be
a solution right now. But I filed an issue upstream:
https://github.com/wikimedia/eslint-config-wikimedia/issues/177
Option 1 might work in this instance, but I expect this to come up again
and again, since this is some pretty common syntax.
Option 3 would mean a lot of local config code that would need to keep
up with changes to the repo.
Option 4 would loose us some rules that we apparently would like to use.
This leaves Option 2. Since the 'no-restricted-syntax' option seems to
be only used for disallowing syntax for compatibility reasons by
Wikimedia, it should be fine to just not check it at all.