Skip to content

Commit

Permalink
Use Set
Browse files Browse the repository at this point in the history
  • Loading branch information
jeddy3 committed Nov 21, 2020
1 parent 058e352 commit 1286458
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rules/dashed-ident-no-missing-reference-function/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const messages = ruleMessages(ruleName, {
`Unexpected missing dashed-ident reference function for "${dashedIdent}"`,
});

const REFERENCE_FUNCTIONS = ['color', 'env', 'var'];
const REFERENCE_FUNCTIONS = new Set(['color', 'env', 'var']);

function rule(actual) {
return (root, result) => {
Expand Down Expand Up @@ -53,7 +53,7 @@ function isDashedIdent(node) {
}

function isReferenceFunction(node) {
return node.type === 'function' && REFERENCE_FUNCTIONS.includes(node.value);
return node.type === 'function' && REFERENCE_FUNCTIONS.has(node.value);
}

rule.ruleName = ruleName;
Expand Down

0 comments on commit 1286458

Please sign in to comment.