1 | "use strict"; |
||
2 | |||
3 | const Loggger = require('../logger/SpeakerLogger'); |
||
4 | |||
5 | /** |
||
6 | * Represent the leprechaun with it's name |
||
7 | */ |
||
8 | class Plugin { |
||
9 | |||
10 | /** |
||
11 | * @param {string} name |
||
12 | */ |
||
13 | constructor(name) { |
||
14 | this.name = name; |
||
15 | this.logger = new Loggger(name); |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * @public |
||
20 | * @returns {string} |
||
21 | */ |
||
22 | getName() { |
||
23 | return this.name; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @public |
||
28 | * When Alfred wakes up, he awakens all these leprechauns |
||
29 | * |
||
30 | * @param {Alfred} alfred |
||
31 | * |
||
32 | * @return {Promise} |
||
33 | */ |
||
34 | init(alfred) { |
||
0 ignored issues
–
show
|
|||
35 | this.logger.info('Woken up'); |
||
36 | |||
37 | return Promise.resolve(); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | module.exports = Plugin; |
||
42 |
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.