Skip to content

Commit cfec8cd

Browse files
committed
style: remove linting issue
1 parent ceacfd3 commit cfec8cd

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

eslint-plugin/lib/rules/avoid-keep-awake.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,15 @@ module.exports = {
3434
},
3535
create: function (context) {
3636
return {
37-
Identifier(node){
37+
Identifier(node) {
3838
if (
39-
node?.name === "useKeepAwake"
40-
&& node?.parent.type === "CallExpression"
39+
node?.name === "useKeepAwake" &&
40+
node?.parent.type === "CallExpression"
4141
) {
4242
context.report({ node, messageId: "AvoidKeepAwake" });
43-
}
44-
else if (
45-
node?.name === "activateKeepAwake"
46-
&& node?.parent.type === "CallExpression"
43+
} else if (
44+
node?.name === "activateKeepAwake" &&
45+
node?.parent.type === "CallExpression"
4746
) {
4847
context.report({ node, messageId: "AvoidKeepAwake" });
4948
}

eslint-plugin/tests/lib/rules/avoid-keep-awake.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ const ruleTester = new RuleTester({
4141

4242
const expectedErrorHook = {
4343
messageId: "AvoidKeepAwake",
44-
type: "Identifier",
44+
type: "Identifier",
4545
};
4646

4747
const expectedErrorFunction = {
4848
messageId: "AvoidKeepAwake",
49-
type: "Identifier",
49+
type: "Identifier",
5050
};
5151

5252
ruleTester.run("avoid-keep-awake", rule, {
@@ -80,7 +80,6 @@ ruleTester.run("avoid-keep-awake", rule, {
8080
}
8181
`,
8282
},
83-
,
8483
],
8584
invalid: [
8685
{

0 commit comments

Comments
 (0)