function getUnusedNodes(node, variableMap, groupIfPossible) {
    if (node.type === 'AssignmentPattern') {
        return getUnusedNodes(node.left, variableMap, groupIfPossible);
    }

    if (node.type === 'Identifier') {
        var variable = variableMap[node.name];

        var hasUsages = variable.getReferences().some(function(reference) {
            return !variable.getDefinitions().some(function(definition) {
                return reference.node === definition.node;
            });
        });

        if (hasUsages) {
            return [];
        }

        return [node];
    }

    if (node.type === 'RestElement') {
        var restUnusedNodes = getUnusedNodes(node.argument, variableMap, groupIfPossible);
        if (groupIfPossible && restUnusedNodes.length === 1 && node.argument === restUnusedNodes[0]) {
            return [node];
        }
        return restUnusedNodes;
    }

    if (node.type === 'ArrayPattern') {
        var unusedArrayNodes = [];
        node.elements.forEach(function(element) {
            if (element) {
                unusedArrayNodes = unusedArrayNodes.concat(getUnusedNodes(element, variableMap, groupIfPossible));
                return;
            }
            unusedArrayNodes.push(null);
        });
        if (groupIfPossible && unusedArrayNodes.length === node.elements.length) {
            if (node.elements.every(function(element, index) {
                return unusedArrayNodes[index] === element;
            })) {
                return [node];
            }
        }
        return unusedArrayNodes.filter(function(node) { return node; });
    }

    if (node.type === 'ObjectPattern') {
        var unusedObjectNodes = [];
        node.properties.forEach(function(property) {
            unusedObjectNodes = unusedObjectNodes.concat(getUnusedNodes(property.value, variableMap, groupIfPossible));
        });
        if (groupIfPossible && unusedObjectNodes.length === node.properties.length) {
            if (node.properties.every(function(property, index) {
                return unusedObjectNodes[index] === property.value;
            })) {
                return [node];
            }
        }
        return unusedObjectNodes;
    }

    return [];
}
Disallows unused params in function expression and function declaration.

Types: `Boolean`

Values: `true`

#### Example

```js
"disallowUnusedParams": true
```

##### Valid

```js
function x(test) {
    return test;
}

var x = function(test) {
    return test;
}
```

##### Invalid

```js
function x(test) {
}

var x = function(test) {
}
```