@testgorilla/eslint-plugin-e2e
Advanced tools
| /** | ||
| * Disallow hardcoded `dummy.tests+` email literals in specs. | ||
| * | ||
| * Generated identities must come from the `rand*Email` generators | ||
| * (`@testgorilla/e2e-framework/config`) so every row created on the shared | ||
| * staging database carries the run marker the purge jobs select on | ||
| * (.github/instructions/07-test-data.md). Fixture addresses that genuinely must be | ||
| * static belong in a named const (helpers/config or @testgorilla/e2e-assets), | ||
| * not inline in a spec. | ||
| */ | ||
| const MARKER = 'dummy.tests+'; | ||
| const MESSAGE = | ||
| `Hardcoded "${MARKER}…" email. Mint identities with randCandidateEmail/randCustomerEmail/` + | ||
| 'randTeamMemberEmail (run-marked, purgeable), or reference a named const for static fixtures.'; | ||
| module.exports = { | ||
| meta: { | ||
| type: 'problem', | ||
| docs: { | ||
| description: 'disallow hardcoded dummy.tests+ email literals in specs', | ||
| }, | ||
| schema: [], | ||
| messages: { | ||
| hardcodedTestEmail: MESSAGE, | ||
| }, | ||
| }, | ||
| create(context) { | ||
| const check = (node, value) => { | ||
| if (typeof value === 'string' && value.includes(MARKER)) { | ||
| context.report({ node, messageId: 'hardcodedTestEmail' }); | ||
| } | ||
| }; | ||
| return { | ||
| Literal(node) { | ||
| check(node, node.value); | ||
| }, | ||
| TemplateElement(node) { | ||
| check(node, node.value && node.value.cooked); | ||
| }, | ||
| }; | ||
| }, | ||
| }; |
+2
-0
| const requireTagInTests = require('./lib/rules/require-tag-in-tests'); | ||
| const validateTestCaseTickets = require('./lib/rules/validate-test-case-tickets'); | ||
| const exclusiveTriageTags = require('./lib/rules/exclusive-triage-tags'); | ||
| const noHardcodedTestEmails = require('./lib/rules/no-hardcoded-test-emails'); | ||
@@ -10,3 +11,4 @@ module.exports = { | ||
| 'exclusive-triage-tags': exclusiveTriageTags, | ||
| 'no-hardcoded-test-emails': noHardcodedTestEmails, | ||
| }, | ||
| }; |
+1
-1
| { | ||
| "name": "@testgorilla/eslint-plugin-e2e", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "TestGorilla e2e test conventions: tag enforcement, JIRA ticket validation (cross-repo aware), triage-tag exclusivity. Extracted from tgo-qa-automation's eslint-plugin-custom for reuse by repos that collocate their e2e suites.", | ||
@@ -5,0 +5,0 @@ "license": "UNLICENSED", |
+2
-2
@@ -48,4 +48,4 @@ # @testgorilla/eslint-plugin-e2e | ||
| tgo-qa-automation continues to use its local `eslint-plugin-custom` until the | ||
| planned switch (a follow-up alongside the import-path cleanup). | ||
| tgo-qa-automation uses this plugin as its active lint plugin (file:-installed | ||
| from the workspace); `eslint-plugin-custom` has been retired (QA-3745). | ||
@@ -52,0 +52,0 @@ ## Develop |
Explicitly Unlicensed Item
LicenseSomething was found which is explicitly marked as unlicensed.
Explicitly Unlicensed Item
LicenseSomething was found which is explicitly marked as unlicensed.
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
16999
9.5%10
11.11%362
13.48%0
-100%