Skip to content

Commit 6f5c895

Browse files
authored
Merge pull request #16 from htmlacademy/feature/check-unused-params
Feature/check unused params
2 parents 821703f + f54fcf5 commit 6f5c895

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"hint"
3030
],
3131
"scripts": {
32-
"test": "npm link eslint-config-htmlacademy && eslint test/"
32+
"test": "npm link eslint-config-htmlacademy && eslint test/",
33+
"deploy": "npm run test && npm publish --access public"
3334
},
3435
"repository": {
3536
"type": "git",

test/es6/unused-params.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const bar = (param2) => {
2+
return param2;
3+
};
4+
5+
const foo = () => {
6+
bar();
7+
};
8+
9+
const myObject = {
10+
method1() {
11+
return `12`;
12+
},
13+
methodWithIgnoredParam(_ignore) {
14+
return 42;
15+
}
16+
};
17+
18+
bar(function () {
19+
foo(function () {
20+
myObject.method1();
21+
myObject.methodWithIgnoredParam(122);
22+
});
23+
});

0 commit comments

Comments
 (0)