Skip to content

Commit 02ad33f

Browse files
committed
fix: replace double quotes with single quotes in no-chained-get.js
1 parent 18474cf commit 02ad33f

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/rules/no-chained-get.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22

33
//------------------------------------------------------------------------------
44
// Rule Definition
@@ -7,31 +7,31 @@
77
/** @type {import('eslint').Rule.RuleModule} */
88
module.exports = {
99
meta: {
10-
type: "problem",
10+
type: 'problem',
1111
docs: {
12-
description: "disallow chain of `cy.get()` calls",
12+
description: 'disallow chain of `cy.get()` calls',
1313
recommended: false,
14-
url: "https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-chained-get.md",
14+
url: 'https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-chained-get.md',
1515
},
1616
fixable: null,
1717
schema: [],
1818
messages: {
19-
unexpected: "Avoid chaining multiple cy.get() calls.",
19+
unexpected: 'Avoid chaining multiple cy.get() calls.',
2020
},
2121
},
2222

2323
create(context) {
2424
const isRootCypress = (node) => {
2525
if (
26-
node.type !== "CallExpression" ||
27-
node.callee.type !== "MemberExpression"
26+
node.type !== 'CallExpression' ||
27+
node.callee.type !== 'MemberExpression'
2828
) {
2929
return false;
3030
}
3131

3232
if (
33-
node.callee.object.type === "Identifier" &&
34-
node.callee.object.name === "cy"
33+
node.callee.object.type === 'Identifier' &&
34+
node.callee.object.name === 'cy'
3535
) {
3636
return true;
3737
}
@@ -43,26 +43,26 @@ module.exports = {
4343
// Check if this node is a get() call
4444
const isGetCall =
4545
node.callee &&
46-
node.callee.type === "MemberExpression" &&
46+
node.callee.type === 'MemberExpression' &&
4747
node.callee.property &&
48-
node.callee.property.type === "Identifier" &&
49-
node.callee.property.name === "get";
48+
node.callee.property.type === 'Identifier' &&
49+
node.callee.property.name === 'get';
5050

5151
if (!isGetCall) {
5252
return false;
5353
}
5454

5555
const obj = node.callee.object;
5656

57-
if (obj.type === "CallExpression") {
57+
if (obj.type === 'CallExpression') {
5858
const objCallee = obj.callee;
5959

6060
if (
6161
objCallee &&
62-
objCallee.type === "MemberExpression" &&
62+
objCallee.type === 'MemberExpression' &&
6363
objCallee.property &&
64-
objCallee.property.type === "Identifier" &&
65-
objCallee.property.name === "get"
64+
objCallee.property.type === 'Identifier' &&
65+
objCallee.property.name === 'get'
6666
) {
6767
return true;
6868
}
@@ -78,7 +78,7 @@ module.exports = {
7878
if (isRootCypress(node) && hasChainedGet(node)) {
7979
context.report({
8080
node,
81-
messageId: "unexpected",
81+
messageId: 'unexpected',
8282
});
8383
}
8484
},

0 commit comments

Comments
 (0)