eslint-plugin-wdio 9.2.11 → 9.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs +1 -1
- package/build/index.js +1 -1
- package/build/utils/helpers.d.ts +4 -1
- package/build/utils/helpers.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/utils/helpers.ts +11 -3
package/build/index.cjs
CHANGED
|
@@ -95,7 +95,7 @@ var await_expect_default = rule;
|
|
|
95
95
|
// src/utils/helpers.ts
|
|
96
96
|
var isCommand = function(expression, command) {
|
|
97
97
|
const callee = expression?.callee;
|
|
98
|
-
return callee && callee
|
|
98
|
+
return callee && "object" in callee && "name" in callee.object && callee.object?.name === "browser" && "property" in callee && "name" in callee.property && callee.property?.name === command;
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
// src/rules/no-debug.ts
|
package/build/index.js
CHANGED
|
@@ -67,7 +67,7 @@ var await_expect_default = rule;
|
|
|
67
67
|
// src/utils/helpers.ts
|
|
68
68
|
var isCommand = function(expression, command) {
|
|
69
69
|
const callee = expression?.callee;
|
|
70
|
-
return callee && callee
|
|
70
|
+
return callee && "object" in callee && "name" in callee.object && callee.object?.name === "browser" && "property" in callee && "name" in callee.property && callee.property?.name === command;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
// src/rules/no-debug.ts
|
package/build/utils/helpers.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Rule } from 'eslint';
|
|
2
|
+
type CallExpression = Parameters<NonNullable<Rule.NodeListener['CallExpression']>>[0];
|
|
3
|
+
export declare const isCommand: (expression: CallExpression, command: "pause" | "debug") => boolean;
|
|
4
|
+
export {};
|
|
2
5
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,eAAwB,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAElC,KAAK,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAErF,eAAO,MAAM,SAAS,eAAwB,cAAc,WAAW,OAAO,GAAG,OAAO,KAAG,OAY1F,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-wdio",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.4",
|
|
4
4
|
"description": "Eslint rules for WebdriverIO",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/eslint-plugin-wdio",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@types/estree": "^1.0.1",
|
|
40
40
|
"eslint": "^9.0.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "d327d86e07d16eaa0ecdf0656c1868ba73261393"
|
|
43
43
|
}
|
package/src/utils/helpers.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Rule } from 'eslint'
|
|
2
|
+
|
|
3
|
+
type CallExpression = Parameters<NonNullable<Rule.NodeListener['CallExpression']>>[0]
|
|
4
|
+
|
|
5
|
+
export const isCommand = function(expression: CallExpression, command: 'pause' | 'debug'): boolean {
|
|
2
6
|
const callee = expression?.callee
|
|
3
7
|
|
|
4
8
|
return (
|
|
5
9
|
callee &&
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
'object' in callee &&
|
|
11
|
+
'name' in callee.object &&
|
|
12
|
+
callee.object?.name === 'browser' &&
|
|
13
|
+
'property' in callee &&
|
|
14
|
+
'name' in callee.property &&
|
|
15
|
+
callee.property?.name === command
|
|
8
16
|
)
|
|
9
17
|
}
|
|
10
18
|
|