Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 11 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /* eslint-disable import/no-commonjs */ |
||
3 | const path = require('path'); |
||
4 | |||
5 | module.exports = { |
||
6 | filterExamples(values, cases, { fileName, tests: testFiles }) { |
||
|
|||
7 | const examples = cases |
||
8 | .filter(c => c.helpers.includes(values.name)); |
||
9 | const testFile = testFiles.find(f => f === path.join('tests', 'helpers', fileName, `${values.name}.test.js`)); |
||
10 | |||
11 | return { examples, testFiles: [ testFile ] }; |
||
12 | } |
||
13 | }; |
||
14 |
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.