eslint-plugin-wdio
Advanced tools
Comparing version 9.0.0-alpha.78 to 9.0.0-alpha.113
@@ -1,2 +0,5 @@ | ||
export const MATCHERS = [ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MATCHERS = void 0; | ||
exports.MATCHERS = [ | ||
'toHaveTitle', | ||
@@ -3,0 +6,0 @@ 'toHaveTitleContaining', |
@@ -1,24 +0,54 @@ | ||
declare const rules: { | ||
'await-expect': import("eslint").Rule.RuleModule; | ||
'no-debug': import("eslint").Rule.RuleModule; | ||
'no-pause': import("eslint").Rule.RuleModule; | ||
}; | ||
declare const configs: { | ||
recommended: { | ||
globals: { | ||
$: boolean; | ||
$$: boolean; | ||
browser: boolean; | ||
driver: boolean; | ||
expect: boolean; | ||
multiremotebrowser: boolean; | ||
declare const _default: { | ||
configs: { | ||
'flat/recommended': { | ||
languageOptions: { | ||
globals: { | ||
readonly $: false; | ||
readonly $$: false; | ||
readonly browser: false; | ||
readonly driver: false; | ||
readonly expect: false; | ||
readonly multiremotebrowser: false; | ||
}; | ||
}; | ||
plugins: { | ||
wdio: { | ||
configs: {}; | ||
rules: { | ||
'await-expect': import("eslint").Rule.RuleModule; | ||
'no-debug': import("eslint").Rule.RuleModule; | ||
'no-pause': import("eslint").Rule.RuleModule; | ||
}; | ||
}; | ||
}; | ||
rules: { | ||
readonly 'wdio/await-expect': "error"; | ||
readonly 'wdio/no-debug': "error"; | ||
readonly 'wdio/no-pause': "error"; | ||
}; | ||
}; | ||
rules: { | ||
'wdio/await-expect': string; | ||
'wdio/no-debug': string; | ||
'wdio/no-pause': string; | ||
recommended: { | ||
globals: { | ||
readonly $: false; | ||
readonly $$: false; | ||
readonly browser: false; | ||
readonly driver: false; | ||
readonly expect: false; | ||
readonly multiremotebrowser: false; | ||
}; | ||
plugins: string[]; | ||
rules: { | ||
readonly 'wdio/await-expect': "error"; | ||
readonly 'wdio/no-debug': "error"; | ||
readonly 'wdio/no-pause': "error"; | ||
}; | ||
}; | ||
}; | ||
rules: { | ||
'await-expect': import("eslint").Rule.RuleModule; | ||
'no-debug': import("eslint").Rule.RuleModule; | ||
'no-pause': import("eslint").Rule.RuleModule; | ||
}; | ||
}; | ||
export { rules, configs, }; | ||
export = _default; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,26 +0,51 @@ | ||
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 | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
const configs = { | ||
recommended: { | ||
globals: { | ||
$: false, | ||
$$: false, | ||
browser: false, | ||
driver: false, | ||
expect: false, | ||
multiremotebrowser: false, | ||
}, | ||
rules: { | ||
'wdio/await-expect': 'error', | ||
'wdio/no-debug': 'error', | ||
'wdio/no-pause': 'error', | ||
} | ||
} | ||
const await_expect_js_1 = __importDefault(require("./rules/await-expect.js")); | ||
const no_debug_js_1 = __importDefault(require("./rules/no-debug.js")); | ||
const no_pause_js_1 = __importDefault(require("./rules/no-pause.js")); | ||
const sharedGlobals = { | ||
$: false, | ||
$$: false, | ||
browser: false, | ||
driver: false, | ||
expect: false, | ||
multiremotebrowser: false, | ||
}; | ||
export { rules, configs, }; | ||
const sharedConfig = { | ||
rules: { | ||
'wdio/await-expect': 'error', | ||
'wdio/no-debug': 'error', | ||
'wdio/no-pause': 'error', | ||
}, | ||
}; | ||
const index = { | ||
configs: {}, | ||
rules: { | ||
'await-expect': await_expect_js_1.default, | ||
'no-debug': no_debug_js_1.default, | ||
'no-pause': no_pause_js_1.default, | ||
}, | ||
}; | ||
const legacyConfig = { | ||
...sharedConfig, | ||
globals: sharedGlobals, | ||
plugins: ['wdio'], | ||
}; | ||
const flatConfig = { | ||
...sharedConfig, | ||
languageOptions: { | ||
globals: sharedGlobals, | ||
}, | ||
plugins: { | ||
wdio: index, | ||
}, | ||
}; | ||
module.exports = { | ||
...index, | ||
configs: { | ||
'flat/recommended': flatConfig, | ||
recommended: legacyConfig, | ||
}, | ||
}; |
@@ -1,2 +0,4 @@ | ||
import { MATCHERS } from '../constants.js'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const constants_js_1 = require("../constants.js"); | ||
const rule = { | ||
@@ -26,3 +28,3 @@ meta: { | ||
node.callee.object.callee.name !== 'expect' || | ||
!MATCHERS.includes(node.callee.property.name)) { | ||
!constants_js_1.MATCHERS.includes(node.callee.property.name)) { | ||
return; | ||
@@ -45,2 +47,2 @@ } | ||
}; | ||
export default rule; | ||
exports.default = rule; |
@@ -1,2 +0,4 @@ | ||
import { isCommand } from '../utils/helpers.js'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const helpers_js_1 = require("../utils/helpers.js"); | ||
const rule = { | ||
@@ -20,3 +22,3 @@ meta: { | ||
CallExpression(node) { | ||
if (isCommand(node, 'debug')) { | ||
if ((0, helpers_js_1.isCommand)(node, 'debug')) { | ||
context.report({ node, messageId: 'unexpectedDebug' }); | ||
@@ -28,2 +30,2 @@ } | ||
}; | ||
export default rule; | ||
exports.default = rule; |
@@ -1,2 +0,4 @@ | ||
import { isCommand } from '../utils/helpers.js'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const helpers_js_1 = require("../utils/helpers.js"); | ||
const rule = { | ||
@@ -20,3 +22,3 @@ meta: { | ||
CallExpression(node) { | ||
if (isCommand(node, 'pause')) { | ||
if ((0, helpers_js_1.isCommand)(node, 'pause')) { | ||
context.report({ node, messageId: 'unexpectedPause' }); | ||
@@ -28,2 +30,2 @@ } | ||
}; | ||
export default rule; | ||
exports.default = rule; |
@@ -1,2 +0,5 @@ | ||
export const isCommand = function (expression, command) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isCommand = void 0; | ||
const isCommand = function (expression, command) { | ||
const callee = expression?.callee; | ||
@@ -7,1 +10,2 @@ return (callee && | ||
}; | ||
exports.isCommand = isCommand; |
@@ -5,30 +5,48 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.configs = exports.rules = void 0; | ||
const await_expect_js_1 = __importDefault(require("./rules/await-expect.js")); | ||
const no_debug_js_1 = __importDefault(require("./rules/no-debug.js")); | ||
const no_pause_js_1 = __importDefault(require("./rules/no-pause.js")); | ||
const rules = { | ||
'await-expect': await_expect_js_1.default, | ||
'no-debug': no_debug_js_1.default, | ||
'no-pause': no_pause_js_1.default | ||
const sharedGlobals = { | ||
$: false, | ||
$$: false, | ||
browser: false, | ||
driver: false, | ||
expect: false, | ||
multiremotebrowser: false, | ||
}; | ||
exports.rules = rules; | ||
const configs = { | ||
recommended: { | ||
globals: { | ||
$: false, | ||
$$: false, | ||
browser: false, | ||
driver: false, | ||
expect: false, | ||
multiremotebrowser: false, | ||
}, | ||
rules: { | ||
'wdio/await-expect': 'error', | ||
'wdio/no-debug': 'error', | ||
'wdio/no-pause': 'error', | ||
} | ||
} | ||
const sharedConfig = { | ||
rules: { | ||
'wdio/await-expect': 'error', | ||
'wdio/no-debug': 'error', | ||
'wdio/no-pause': 'error', | ||
}, | ||
}; | ||
exports.configs = configs; | ||
const index = { | ||
configs: {}, | ||
rules: { | ||
'await-expect': await_expect_js_1.default, | ||
'no-debug': no_debug_js_1.default, | ||
'no-pause': no_pause_js_1.default, | ||
}, | ||
}; | ||
const legacyConfig = { | ||
...sharedConfig, | ||
globals: sharedGlobals, | ||
plugins: ['wdio'], | ||
}; | ||
const flatConfig = { | ||
...sharedConfig, | ||
languageOptions: { | ||
globals: sharedGlobals, | ||
}, | ||
plugins: { | ||
wdio: index, | ||
}, | ||
}; | ||
module.exports = { | ||
...index, | ||
configs: { | ||
'flat/recommended': flatConfig, | ||
recommended: legacyConfig, | ||
}, | ||
}; |
{ | ||
"name": "eslint-plugin-wdio", | ||
"version": "9.0.0-alpha.78+fee2f8a88", | ||
"version": "9.0.0-alpha.113+ceeac488e", | ||
"description": "Eslint rules for WebdriverIO", | ||
@@ -8,3 +8,2 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"license": "MIT", | ||
"type": "module", | ||
"main": "./cjs/index.js", | ||
@@ -14,10 +13,10 @@ "module": "./build/index.js", | ||
"exports": { | ||
".": [ | ||
{ | ||
"types": "./build/index.d.ts", | ||
"import": "./build/index.js", | ||
"require": "./cjs/index.js" | ||
}, | ||
"./cjs/index.js" | ||
] | ||
"import": { | ||
"types": "./build/index.d.ts", | ||
"default": "./build/index.js" | ||
}, | ||
"require": { | ||
"types": "./build/index.d.ts", | ||
"default": "./cjs/index.js" | ||
} | ||
}, | ||
@@ -45,5 +44,5 @@ "typeScriptVersion": "3.8.3", | ||
"@types/estree": "^1.0.1", | ||
"eslint": "^8.10.0" | ||
"eslint": "^9.0.0" | ||
}, | ||
"gitHead": "fee2f8a88d132537795eaf144abf1a7e242f99ff" | ||
"gitHead": "ceeac488e86da4d6ffad891632183085e4332be7" | ||
} |
@@ -5,29 +5,50 @@ import awaitExpect from './rules/await-expect.js' | ||
const rules = { | ||
'await-expect': awaitExpect, | ||
'no-debug': noDebug, | ||
'no-pause': noPause | ||
const sharedGlobals = { | ||
$: false, | ||
$$: false, | ||
browser: false, | ||
driver: false, | ||
expect: false, | ||
multiremotebrowser: false, | ||
} as const | ||
const sharedConfig = { | ||
rules: { | ||
'wdio/await-expect': 'error', | ||
'wdio/no-debug': 'error', | ||
'wdio/no-pause': 'error', | ||
}, | ||
} as const | ||
const index = { | ||
configs: {}, | ||
rules: { | ||
'await-expect': awaitExpect, | ||
'no-debug': noDebug, | ||
'no-pause': noPause, | ||
}, | ||
} | ||
const configs = { | ||
recommended: { | ||
globals: { | ||
$: false, | ||
$$: false, | ||
browser: false, | ||
driver: false, | ||
expect: false, | ||
multiremotebrowser: false, | ||
}, | ||
rules: { | ||
'wdio/await-expect': 'error', | ||
'wdio/no-debug': 'error', | ||
'wdio/no-pause': 'error', | ||
} | ||
} | ||
const legacyConfig = { | ||
...sharedConfig, | ||
globals: sharedGlobals, | ||
plugins: ['wdio'], | ||
} | ||
export { | ||
rules, | ||
configs, | ||
const flatConfig = { | ||
...sharedConfig, | ||
languageOptions: { | ||
globals: sharedGlobals, | ||
}, | ||
plugins: { | ||
wdio: index, | ||
}, | ||
} | ||
export = { | ||
...index, | ||
configs: { | ||
'flat/recommended': flatConfig, | ||
recommended: legacyConfig, | ||
}, | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
24741
665
No