eslint-plugin-wdio
Advanced tools
Comparing version 7.20.8 to 8.0.0-alpha.213
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MATCHERS = void 0; | ||
exports.MATCHERS = [ | ||
export const MATCHERS = [ | ||
'toHaveTitle', | ||
@@ -14,3 +11,5 @@ 'toHaveTitleContaining', | ||
'toBeEnabled', | ||
'toExist', | ||
'toBeExisting', | ||
'toBePresent', | ||
'toBeFocused', | ||
@@ -17,0 +16,0 @@ 'toBeSelected', |
@@ -1,16 +0,9 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.configs = exports.rules = void 0; | ||
const await_expect_1 = __importDefault(require("./rules/await-expect")); | ||
const no_debug_1 = __importDefault(require("./rules/no-debug")); | ||
const no_pause_1 = __importDefault(require("./rules/no-pause")); | ||
import awaitExpect from './rules/await-expect.js'; | ||
import noDebug from './rules/no-debug.js'; | ||
import noPause from './rules/no-pause.js'; | ||
const rules = { | ||
'await-expect': await_expect_1.default, | ||
'no-debug': no_debug_1.default, | ||
'no-pause': no_pause_1.default | ||
'await-expect': awaitExpect, | ||
'no-debug': noDebug, | ||
'no-pause': noPause | ||
}; | ||
exports.rules = rules; | ||
const configs = { | ||
@@ -33,2 +26,2 @@ recommended: { | ||
}; | ||
exports.configs = configs; | ||
export { rules, configs, }; |
@@ -1,4 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constants_1 = require("../constants"); | ||
import { MATCHERS } from '../constants.js'; | ||
const rule = { | ||
@@ -28,3 +26,3 @@ meta: { | ||
node.callee.object.callee.name !== 'expect' || | ||
!constants_1.MATCHERS.includes(node.callee.property.name)) { | ||
!MATCHERS.includes(node.callee.property.name)) { | ||
return; | ||
@@ -47,2 +45,2 @@ } | ||
}; | ||
exports.default = rule; | ||
export default rule; |
@@ -1,4 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const helpers_1 = require("../utils/helpers"); | ||
import { isCommand } from '../utils/helpers.js'; | ||
const rule = { | ||
@@ -22,3 +20,3 @@ meta: { | ||
CallExpression(node) { | ||
if ((0, helpers_1.isCommand)(node, 'debug')) { | ||
if (isCommand(node, 'debug')) { | ||
context.report({ node, messageId: 'unexpectedDebug' }); | ||
@@ -30,2 +28,2 @@ } | ||
}; | ||
exports.default = rule; | ||
export default rule; |
@@ -1,4 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const helpers_1 = require("../utils/helpers"); | ||
import { isCommand } from '../utils/helpers.js'; | ||
const rule = { | ||
@@ -22,3 +20,3 @@ meta: { | ||
CallExpression(node) { | ||
if ((0, helpers_1.isCommand)(node, 'pause')) { | ||
if (isCommand(node, 'pause')) { | ||
context.report({ node, messageId: 'unexpectedPause' }); | ||
@@ -30,2 +28,2 @@ } | ||
}; | ||
exports.default = rule; | ||
export default rule; |
@@ -1,12 +0,6 @@ | ||
"use strict"; | ||
// import type { TSESTree } from '@typescript-eslint/utils' | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isCommand = void 0; | ||
const isCommand = function (expression, command) { | ||
var _a, _b; | ||
const callee = expression === null || expression === void 0 ? void 0 : expression.callee; | ||
export const isCommand = function (expression, command) { | ||
const callee = expression?.callee; | ||
return (callee && | ||
((_a = callee === null || callee === void 0 ? void 0 : callee.object) === null || _a === void 0 ? void 0 : _a.name) === 'browser' && | ||
((_b = callee === null || callee === void 0 ? void 0 : callee.property) === null || _b === void 0 ? void 0 : _b.name) === command); | ||
callee?.object?.name === 'browser' && | ||
callee?.property?.name === command); | ||
}; | ||
exports.isCommand = isCommand; |
{ | ||
"name": "eslint-plugin-wdio", | ||
"version": "7.20.8", | ||
"version": "8.0.0-alpha.213+c5fb6d57e", | ||
"description": "Eslint rules for WebdriverIO", | ||
@@ -8,5 +8,8 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"license": "MIT", | ||
"main": "build/index.js", | ||
"type": "module", | ||
"exports": "./build/index.js", | ||
"types": "./build/index.d.ts", | ||
"typeScriptVersion": "3.8.3", | ||
"engines": { | ||
"node": ">=12.0.0" | ||
"node": "^16.13 || >=18" | ||
}, | ||
@@ -28,6 +31,6 @@ "repository": { | ||
"devDependencies": { | ||
"@types/estree": "^1.0.0", | ||
"@types/estree": "^0.0.52", | ||
"eslint": "^8.10.0" | ||
}, | ||
"gitHead": "8ea0ee903b02157b9ee511c8750be2282b4f4519" | ||
"gitHead": "c5fb6d57e168d8bf939a5aa5c2ada5abaceec5eb" | ||
} |
@@ -11,3 +11,5 @@ export const MATCHERS = [ | ||
'toBeEnabled', | ||
'toExist', | ||
'toBeExisting', | ||
'toBePresent', | ||
'toBeFocused', | ||
@@ -14,0 +16,0 @@ 'toBeSelected', |
@@ -1,9 +0,9 @@ | ||
import awaitExpect from './rules/await-expect' | ||
import noDebug from './rules/no-debug' | ||
import noPause from './rules/no-pause' | ||
import awaitExpect from './rules/await-expect.js' | ||
import noDebug from './rules/no-debug.js' | ||
import noPause from './rules/no-pause.js' | ||
const rules = { | ||
'await-expect' : awaitExpect, | ||
'no-debug' : noDebug, | ||
'no-pause' : noPause | ||
'await-expect': awaitExpect, | ||
'no-debug': noDebug, | ||
'no-pause': noPause | ||
} | ||
@@ -14,13 +14,13 @@ | ||
globals: { | ||
$ : false, | ||
$$ : false, | ||
browser : false, | ||
driver : false, | ||
expect : false, | ||
multiremotebrowser : false, | ||
$: false, | ||
$$: false, | ||
browser: false, | ||
driver: false, | ||
expect: false, | ||
multiremotebrowser: false, | ||
}, | ||
rules : { | ||
'wdio/await-expect' : 'error', | ||
'wdio/no-debug' : 'error', | ||
'wdio/no-pause' : 'error', | ||
rules: { | ||
'wdio/await-expect': 'error', | ||
'wdio/no-debug': 'error', | ||
'wdio/no-pause': 'error', | ||
} | ||
@@ -27,0 +27,0 @@ } |
import type { Rule } from 'eslint' | ||
import type { Identifier } from 'estree' | ||
import { MATCHERS } from '../constants' | ||
import { MATCHERS } from '../constants.js' | ||
@@ -6,0 +6,0 @@ const rule: Rule.RuleModule = { |
import { Rule } from 'eslint' | ||
import { isCommand } from '../utils/helpers' | ||
import { isCommand } from '../utils/helpers.js' | ||
@@ -4,0 +4,0 @@ const rule: Rule.RuleModule = { |
import { Rule } from 'eslint' | ||
import { isCommand } from '../utils/helpers' | ||
import { isCommand } from '../utils/helpers.js' | ||
@@ -4,0 +4,0 @@ const rule: Rule.RuleModule = { |
@@ -1,3 +0,1 @@ | ||
// import type { TSESTree } from '@typescript-eslint/utils' | ||
export const isCommand = function(expression: any, command: 'pause' | 'debug'): boolean { | ||
@@ -4,0 +2,0 @@ const callee = expression?.callee |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Yes
15727
376
1
1