aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/diff/DifferenceEngineTest.php
diff options
context:
space:
mode:
authorBartosz DziewoƄski <matma.rex@gmail.com>2018-09-28 14:36:04 +0200
committerJames D. Forrester <jforrester@wikimedia.org>2018-11-07 07:32:40 -0800
commit6ad73362f376a0399bd1568fe7bbf40425737311 (patch)
tree79d601745851b3db816371b97fa08ca958d3bfcf /tests/phpunit/includes/diff/DifferenceEngineTest.php
parentf77b1ed3c48ffbbee7639d343b5e1bfc182432f9 (diff)
downloadmediawikicore-6ad73362f376a0399bd1568fe7bbf40425737311.tar.gz
mediawikicore-6ad73362f376a0399bd1568fe7bbf40425737311.zip
eslintrc: Disallow calling String/Array/Object methods introduced in ES6 or later
This aims to disallow using the methods listed below, which are supported by Chromium 69 but not supported by Internet Explorer 11. Most of them were introduced in ECMAScript 6, but some are more recent or experimental. We keep breaking IE 11 support by using them. Recent examples include: * mediawiki/core: Ic85063dfbbcf26a99d343845c9fb801f1888d750 * mediawiki/extensions/MultimediaViewer: I0954c42a37668b0eb46c3e864a2e13152a6dc68a * mediawiki/extensions/UploadWizard: I70d37a8f0abcc96b5e39fa71a93cda6f3421c87c * VisualEditor/VisualEditor: Ic1971549da37091c41a847229d18e95aff5c9952 This will unfortunately almost certainly cause false positives, but hopefully not too many of them. Common false positives can be disallowed more precisely using 'no-restricted-syntax' rather than 'no-restricted-properties'. Disallowed methods: String.prototype: codePointAt endsWith includes normalize padEnd (ES 2017) padStart (ES 2017) repeat startsWith trimEnd (experimental/proposed) trimLeft (experimental/proposed) trimRight (experimental/proposed) trimStart (experimental/proposed) Array.prototype: copyWithin entries fill find findIndex flat (experimental/proposed) flatMap (experimental/proposed) includes (ES 2016) keys values String: fromCodePoint raw Array: from of Object: assign entries (ES 2017) getOwnPropertyDescriptors (ES 2017) getOwnPropertySymbols is values (ES 2017) I compiled the list based on running the following code in each browser's console, since there doesn't seem to be an authoritative list anywhere on the Internet: console.log( Object.getOwnPropertyNames( String.prototype ) ) console.log( Object.getOwnPropertyNames( Array.prototype ) ) console.log( Object.getOwnPropertyNames( Object.prototype ) ) console.log( Object.getOwnPropertyNames( String ) ) console.log( Object.getOwnPropertyNames( Array ) ) console.log( Object.getOwnPropertyNames( Object ) ) Change-Id: Ic44c79834f99c52863fbc544ad657787f70fb9bb
Diffstat (limited to 'tests/phpunit/includes/diff/DifferenceEngineTest.php')
0 files changed, 0 insertions, 0 deletions