diff --git a/resources/.eslintrc.json b/resources/.eslintrc.json index cf7d7d995..4303c8f95 100644 --- a/resources/.eslintrc.json +++ b/resources/.eslintrc.json @@ -1,7 +1,4 @@ { "root": true, - "extends": "wikimedia/language/es6", - "rules": { - "no-var": "off" - } + "extends": "wikimedia/language/es6" } diff --git a/resources/ext.popups/index.js b/resources/ext.popups/index.js index 31cf2f9f7..5baeb0d73 100644 --- a/resources/ext.popups/index.js +++ b/resources/ext.popups/index.js @@ -1,7 +1,7 @@ -var types = require( './types.json' ); +const types = require( './types.json' ); // Load Popups when touch events are not available in the browser (e.g. not a mobile device). -var isTouchDevice = 'ontouchstart' in document.documentElement; -var supportNotQueries; +const isTouchDevice = 'ontouchstart' in document.documentElement; +let supportNotQueries; try { supportNotQueries = document.body.matches( 'div:not(.foo,.bar)' ); supportNotQueries = true;