We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea09c9e commit f926ae0Copy full SHA for f926ae0
rules/isolated-functions.js
@@ -33,13 +33,9 @@ const create = context => {
33
};
34
35
options.comments = options.comments.map(comment => comment.toLowerCase());
36
- /** @type {string[]} */
37
- let allowedGlobals = [];
38
- if (options.globals === true) {
39
- allowedGlobals = Object.keys(context.languageOptions.globals);
40
- } else if (Array.isArray(options.globals)) {
41
- allowedGlobals = options.globals;
42
- }
+ const allowedGlobals = options.globals === true
+ ? new Set(Object.keys(context.languageOptions.globals))
+ : new Set(options.globals || []);
43
44
/** @param {import('estree').Node} node */
45
const checkForExternallyScopedVariables = node => {
0 commit comments