chore: add eslint plugin for jest-playwright
This commit is contained in:
parent
b4193b8c68
commit
3db19843e2
@ -16,6 +16,9 @@ extends:
|
|||||||
- plugin:import/typescript
|
- plugin:import/typescript
|
||||||
- plugin:prettier/recommended
|
- plugin:prettier/recommended
|
||||||
- prettier # Removes eslint rules that conflict with prettier.
|
- prettier # Removes eslint rules that conflict with prettier.
|
||||||
|
# Recommended by jest-playwright
|
||||||
|
# https://github.com/playwright-community/jest-playwright#globals
|
||||||
|
- plugin:jest-playwright/recommended
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
# Sometimes you need to add args to implement a function signature even
|
# Sometimes you need to add args to implement a function signature even
|
||||||
@ -32,7 +35,13 @@ rules:
|
|||||||
"@typescript-eslint/no-extra-semi": off
|
"@typescript-eslint/no-extra-semi": off
|
||||||
eqeqeq: error
|
eqeqeq: error
|
||||||
import/order:
|
import/order:
|
||||||
[error, { alphabetize: { order: "asc" }, groups: [["builtin", "external", "internal"], "parent", "sibling"] }]
|
[
|
||||||
|
error,
|
||||||
|
{
|
||||||
|
alphabetize: { order: "asc" },
|
||||||
|
groups: [["builtin", "external", "internal"], "parent", "sibling"],
|
||||||
|
},
|
||||||
|
]
|
||||||
no-async-promise-executor: off
|
no-async-promise-executor: off
|
||||||
# This isn't a real module, just types, which apparently doesn't resolve.
|
# This isn't a real module, just types, which apparently doesn't resolve.
|
||||||
import/no-unresolved: [error, { ignore: ["express-serve-static-core"] }]
|
import/no-unresolved: [error, { ignore: ["express-serve-static-core"] }]
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-import-resolver-alias": "^1.1.2",
|
"eslint-import-resolver-alias": "^1.1.2",
|
||||||
"eslint-plugin-import": "^2.18.2",
|
"eslint-plugin-import": "^2.18.2",
|
||||||
|
"eslint-plugin-jest-playwright": "^0.2.1",
|
||||||
"eslint-plugin-prettier": "^3.1.0",
|
"eslint-plugin-prettier": "^3.1.0",
|
||||||
"istanbul-badges-readme": "^1.2.0",
|
"istanbul-badges-readme": "^1.2.0",
|
||||||
"leaked-handles": "^5.2.0",
|
"leaked-handles": "^5.2.0",
|
||||||
|
@ -7,7 +7,13 @@ const config: Config.InitialOptions = {
|
|||||||
"^.+\\.ts$": "<rootDir>/node_modules/ts-jest",
|
"^.+\\.ts$": "<rootDir>/node_modules/ts-jest",
|
||||||
},
|
},
|
||||||
globalSetup: "<rootDir>/utils/globalSetup.ts",
|
globalSetup: "<rootDir>/utils/globalSetup.ts",
|
||||||
testEnvironment: "node",
|
testEnvironmentOptions: {
|
||||||
|
"jest-playwright": {
|
||||||
|
// TODO enable on webkit as well
|
||||||
|
// waiting on https://github.com/playwright-community/jest-playwright/issues/659
|
||||||
|
browsers: ["chromium", "firefox"],
|
||||||
|
},
|
||||||
|
},
|
||||||
testPathIgnorePatterns: ["/node_modules/", "/lib/", "/out/", "test/unit"],
|
testPathIgnorePatterns: ["/node_modules/", "/lib/", "/out/", "test/unit"],
|
||||||
testTimeout: 30000,
|
testTimeout: 30000,
|
||||||
modulePathIgnorePatterns: [
|
modulePathIgnorePatterns: [
|
||||||
|
@ -3164,6 +3164,11 @@ eslint-plugin-import@^2.18.2:
|
|||||||
resolve "^1.17.0"
|
resolve "^1.17.0"
|
||||||
tsconfig-paths "^3.9.0"
|
tsconfig-paths "^3.9.0"
|
||||||
|
|
||||||
|
eslint-plugin-jest-playwright@^0.2.1:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/eslint-plugin-jest-playwright/-/eslint-plugin-jest-playwright-0.2.1.tgz#8778fee9d5915132a03d94370d3eea0a7ddd08f3"
|
||||||
|
integrity sha512-BicKUJUpVPsLbHN8c5hYaZn6pv8PCMjBGHXUfvlY1p75fh4APVfX2gTK14HuiR8/Bv3fKBQu5MTaqCro4E3OHg==
|
||||||
|
|
||||||
eslint-plugin-prettier@^3.1.0:
|
eslint-plugin-prettier@^3.1.0:
|
||||||
version "3.3.1"
|
version "3.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7"
|
||||||
|
Loading…
Reference in New Issue
Block a user