1 | /* eslint-disable import/no-commonjs */ |
||
2 | /* eslint-disable import/unambiguous */ |
||
3 | const path = require('path'); |
||
4 | |||
5 | module.exports = { |
||
6 | filterExamples(values, cases, { fileName, tests: testFiles }) { |
||
0 ignored issues
–
show
|
|||
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`)); |
||
0 ignored issues
–
show
The variable
testFiles seems to be never declared. If this is a global, consider adding a /** global: testFiles */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
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.