Skip to content

Commit d415e9e

Browse files
committed
Apply linting to E2E tests
1 parent 75fcf8c commit d415e9e

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

e2e/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"plugin:cypress/recommended"
4+
]
5+
}

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
"e2e:prod": "concurrently -k -s first -n \"app,mock,e2e\" \"yarn serve\" \"yarn e2e:mock\" \"yarn e2e:run\"",
2525
"e2e:run": "wait-on -l http-get://localhost:3000 && cypress run",
2626
"eject": "react-scripts eject",
27-
"lint": "eslint src --max-warnings 0 && prettier --config .prettierrc --check 'src/**/*.js'",
28-
"lint:fix": "eslint --fix src",
27+
"lint": "yarn lint:eslint && yarn lint:prettier --check",
28+
"lint:eslint": "eslint e2e src --max-warnings 0",
29+
"lint:prettier": "prettier --config .prettierrc 'e2e/**/*.js' 'src/**/*.js'",
30+
"lint:fix": "yarn lint:eslint --fix",
2931
"prepare": "husky install",
30-
"prettier": "prettier --config .prettierrc --write 'src/**/*.js'",
32+
"prettier": "yarn lint:prettier --write",
3133
"preserve": "REACT_APP_NODE_ENV=LOCAL yarn build",
3234
"serve": "serve --cors --debug -p 3000 --single build",
3335
"start": "REACT_APP_NODE_ENV=LOCAL react-scripts start",
@@ -64,6 +66,7 @@
6466
"cors": "^2.8.5",
6567
"cypress": "^3.4.1",
6668
"eslint-config-prettier": "^8.5.0",
69+
"eslint-plugin-cypress": "^2.12.1",
6770
"eslint-plugin-prettier": "^4.2.1",
6871
"husky": "^8.0.0",
6972
"lint-staged": "^13.0.3",

yarn.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4926,6 +4926,13 @@ eslint-module-utils@^2.7.3:
49264926
dependencies:
49274927
debug "^3.2.7"
49284928

4929+
eslint-plugin-cypress@^2.12.1:
4930+
version "2.12.1"
4931+
resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632"
4932+
integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA==
4933+
dependencies:
4934+
globals "^11.12.0"
4935+
49294936
eslint-plugin-flowtype@^5.2.0:
49304937
version "5.10.0"
49314938
resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.10.0.tgz#7764cc63940f215bf3f0bd2d9a1293b2b9b2b4bb"
@@ -5941,7 +5948,7 @@ global-prefix@^3.0.0:
59415948
kind-of "^6.0.2"
59425949
which "^1.3.1"
59435950

5944-
globals@^11.1.0:
5951+
globals@^11.1.0, globals@^11.12.0:
59455952
version "11.12.0"
59465953
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
59475954
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==

0 commit comments

Comments
 (0)