From 45c8e62066603b99f7e39056c8ff01cb77f25eff Mon Sep 17 00:00:00 2001 From: Rob Walch Date: Fri, 3 Jan 2020 15:52:20 -0500 Subject: [PATCH] Add a lint rule to disallow use of SourceBuffer global --- .eslintrc.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 6e04d135b89..385359a2f3f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -76,6 +76,13 @@ module.exports = { 'never' ], + 'no-restricted-globals': [2, + { + 'name': 'SourceBuffer', + 'message': 'Use `self.SourceBuffer`' + } + ], + 'no-restricted-properties': [2, { 'property': 'findIndex' }, // Intended to block usage of Array.prototype.findIndex { 'property': 'find' } // Intended to block usage of Array.prototype.find