From 8091ad27acbe6e626beb9a3c711721dd6c7616c1 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Tue, 2 Jan 2024 18:05:05 +0300 Subject: [PATCH] Added eslint plugin for playwright --- tests/.eslintrc.json | 4 ++-- tests/.pnp.cjs | 29 +++++++++++++++++++++++++++++ tests/package.json | 1 + tests/yarn.lock | 18 +++++++++++++++++- 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/tests/.eslintrc.json b/tests/.eslintrc.json index 3fb6ceed5..5639c7e9b 100644 --- a/tests/.eslintrc.json +++ b/tests/.eslintrc.json @@ -3,10 +3,10 @@ "overrides": [ { "files": ["*.ts"], - "extends": ["plugin:import/typescript", "standard-with-typescript", "prettier"], + "extends": ["standard-with-typescript", "plugin:playwright/recommended", "prettier"], "parser": "@typescript-eslint/parser", "parserOptions": { - "ecmaVersion": 2018, + "ecmaVersion": "latest", "sourceType": "module", "ecmaFeatures": { "jsx": true diff --git a/tests/.pnp.cjs b/tests/.pnp.cjs index 221c5f602..2efa5fb4f 100755 --- a/tests/.pnp.cjs +++ b/tests/.pnp.cjs @@ -36,6 +36,7 @@ const RAW_RUNTIME_STATE = ["eslint-config-standard-with-typescript", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:43.0.0"],\ ["eslint-plugin-import", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:2.29.1"],\ ["eslint-plugin-n", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:16.6.1"],\ + ["eslint-plugin-playwright", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:0.21.0"],\ ["eslint-plugin-prettier", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:5.1.2"],\ ["eslint-plugin-promise", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:6.1.1"],\ ["prettier", "npm:3.1.1"],\ @@ -1495,6 +1496,33 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["eslint-plugin-playwright", [\ + ["npm:0.21.0", {\ + "packageLocation": "../../../../.yarn/berry/cache/eslint-plugin-playwright-npm-0.21.0-11b59335d2-10c0.zip/node_modules/eslint-plugin-playwright/",\ + "packageDependencies": [\ + ["eslint-plugin-playwright", "npm:0.21.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:0.21.0", {\ + "packageLocation": "./.yarn/__virtual__/eslint-plugin-playwright-virtual-6aa006c87c/5/.yarn/berry/cache/eslint-plugin-playwright-npm-0.21.0-11b59335d2-10c0.zip/node_modules/eslint-plugin-playwright/",\ + "packageDependencies": [\ + ["eslint-plugin-playwright", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:0.21.0"],\ + ["@types/eslint", "npm:8.56.0"],\ + ["@types/eslint-plugin-jest", null],\ + ["eslint", "npm:8.56.0"],\ + ["eslint-plugin-jest", null],\ + ["globals", "npm:13.24.0"]\ + ],\ + "packagePeers": [\ + "@types/eslint-plugin-jest",\ + "@types/eslint",\ + "eslint-plugin-jest",\ + "eslint"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["eslint-plugin-prettier", [\ ["npm:5.1.2", {\ "packageLocation": "../../../../.yarn/berry/cache/eslint-plugin-prettier-npm-5.1.2-d18bb6313f-10c0.zip/node_modules/eslint-plugin-prettier/",\ @@ -1755,6 +1783,7 @@ const RAW_RUNTIME_STATE = ["eslint-config-standard-with-typescript", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:43.0.0"],\ ["eslint-plugin-import", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:2.29.1"],\ ["eslint-plugin-n", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:16.6.1"],\ + ["eslint-plugin-playwright", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:0.21.0"],\ ["eslint-plugin-prettier", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:5.1.2"],\ ["eslint-plugin-promise", "virtual:94f14c72dacee66eb9bad0d3bd8df38873d4c8bc3a7e2cb9fa6db6a4f7da1ede4d65ea1ce5ae3f76fbba9f585473226ddc01aeed0d813bbc197a27c20a47e466#npm:6.1.1"],\ ["prettier", "npm:3.1.1"],\ diff --git a/tests/package.json b/tests/package.json index f71963fbb..a0971d4bf 100644 --- a/tests/package.json +++ b/tests/package.json @@ -25,6 +25,7 @@ "eslint-config-standard-with-typescript": "^43.0.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.1", + "eslint-plugin-playwright": "^0.21.0", "eslint-plugin-prettier": "^5.1.2", "eslint-plugin-promise": "^6.1.1", "prettier": "^3.1.1", diff --git a/tests/yarn.lock b/tests/yarn.lock index 2ee9cda33..d576e9d1c 100644 --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -1012,6 +1012,21 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-playwright@npm:^0.21.0": + version: 0.21.0 + resolution: "eslint-plugin-playwright@npm:0.21.0" + dependencies: + globals: "npm:^13.23.0" + peerDependencies: + eslint: ">=7" + eslint-plugin-jest: ">=25" + peerDependenciesMeta: + eslint-plugin-jest: + optional: true + checksum: e9c68c07aa8df9602f57f18996789aeabe12d978fdb592f79c651bde967e5af4e14e63c0ff61c1aae44be398ead838d4e6ccf5e0d904d8a06013206068978a73 + languageName: node + linkType: hard + "eslint-plugin-prettier@npm:^5.1.2": version: 5.1.2 resolution: "eslint-plugin-prettier@npm:5.1.2" @@ -1266,6 +1281,7 @@ __metadata: eslint-config-standard-with-typescript: "npm:^43.0.0" eslint-plugin-import: "npm:^2.29.1" eslint-plugin-n: "npm:^16.6.1" + eslint-plugin-playwright: "npm:^0.21.0" eslint-plugin-prettier: "npm:^5.1.2" eslint-plugin-promise: "npm:^6.1.1" prettier: "npm:^3.1.1" @@ -1440,7 +1456,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0, globals@npm:^13.24.0": +"globals@npm:^13.19.0, globals@npm:^13.23.0, globals@npm:^13.24.0": version: 13.24.0 resolution: "globals@npm:13.24.0" dependencies: