eslint: extend 'eslint:recommended'

This commit is contained in:
Alex Gleason
2021-08-03 14:29:36 -05:00
parent ad2db4e7bc
commit 594cf088ed
19 changed files with 51 additions and 42 deletions

View File

@ -114,12 +114,11 @@ function findVariablesinAST(tree) {
break;
case parser.TYPE.plural:
result.add(element.value);
const subTrees = Object.values(element.options).map((option) => option.value);
subTrees.forEach((subtree) => {
findVariablesinAST(subtree).forEach((variable) => {
result.add(variable);
});
});
Object.values(element.options)
.map(option => option.value)
.forEach(subtree =>
findVariablesinAST(subtree)
.forEach(variable => result.add(variable)));
break;
case parser.TYPE.literal:
break;