Total Complexity | 4 |
Complexity/F | 1.33 |
Lines of Code | 18 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | 1 | module.exports = (declarations, resolve) => { |
|
|
|||
2 | 28 | const exps = []; |
|
3 | |||
4 | 28 | declarations.forEach(node => { |
|
5 | 38 | const specifiers = node.specifiers || []; |
|
6 | |||
7 | 38 | specifiers.forEach(specifier => { |
|
8 | 38 | exps.push({ |
|
9 | type: specifier.type === 'ExportDefaultSpecifier' |
||
10 | ? 'default' : 'named', |
||
11 | name: specifier.local.name, |
||
12 | exportedName: (specifier.exported || specifier.local).name, |
||
13 | }); |
||
14 | }); |
||
15 | }); |
||
16 | |||
17 | 28 | return exps; |
|
18 | }; |
||
19 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.