eslint-plugin-playwright 0.15.1 → 0.15.3

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.
@@ -15,7 +15,7 @@ exports.default = {
15
15
  }
16
16
  return {
17
17
  CallExpression(node) {
18
- if ((0, ast_1.isTest)(node)) {
18
+ if ((0, ast_1.isTest)(node, ['fixme', 'only', 'skip'])) {
19
19
  unchecked.push(node);
20
20
  }
21
21
  else if ((0, ast_1.isExpectCall)(node)) {
package/lib/utils/ast.js CHANGED
@@ -76,9 +76,12 @@ function findParent(node, type) {
76
76
  : findParent(node.parent, type);
77
77
  }
78
78
  exports.findParent = findParent;
79
- function isTest(node) {
79
+ function isTest(node, modifiers) {
80
80
  return (isTestIdentifier(node.callee) &&
81
81
  !isDescribeCall(node) &&
82
+ (node.callee.type !== 'MemberExpression' ||
83
+ !modifiers ||
84
+ modifiers?.includes(getStringValue(node.callee.property))) &&
82
85
  node.arguments.length === 2 &&
83
86
  ['ArrowFunctionExpression', 'FunctionExpression'].includes(node.arguments[1].type));
84
87
  }
@@ -92,7 +95,7 @@ function isTestHook(node) {
92
95
  exports.isTestHook = isTestHook;
93
96
  const expectSubCommands = new Set(['soft', 'poll']);
94
97
  function getExpectType(node) {
95
- if (isIdentifier(node.callee, 'expect')) {
98
+ if (isIdentifier(node.callee, /(^expect|Expect)$/)) {
96
99
  return 'standalone';
97
100
  }
98
101
  if (node.callee.type === 'MemberExpression' &&
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-plugin-playwright",
3
3
  "description": "ESLint plugin for Playwright testing.",
4
- "version": "0.15.1",
4
+ "version": "0.15.3",
5
5
  "packageManager": "pnpm@8.4.0",
6
6
  "main": "lib/index.js",
7
7
  "repository": "https://github.com/playwright-community/eslint-plugin-playwright",