Skip to content

Commit 2d66155

Browse files
authored
Add Eslint cypress plugin (#15)
1 parent 2ed933d commit 2d66155

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

config/eslint/eslint.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,21 @@ module.exports = {
7272
],
7373
},
7474
},
75+
{
76+
files: ['cypress/**/*.js', 'cypress/**/*.ts', 'cypress/**/*.json'],
77+
plugins: ['cypress'],
78+
extends: ['plugin:cypress/recommended'],
79+
env: {
80+
"cypress/globals": true
81+
},
82+
"rules": {
83+
"cypress/no-assigning-return-values": "error",
84+
"cypress/no-unnecessary-waiting": "error",
85+
"cypress/no-force": "error",
86+
"cypress/no-async-tests": "error",
87+
"cypress/no-pause": "error"
88+
},
89+
},
7590
],
7691
root: true,
7792
env: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"eslint": "^8.38.0",
1818
"eslint-config-crockford": "2.0.0",
1919
"eslint-config-standard": "14.1.1",
20+
"eslint-plugin-cypress": "^2.15.1",
2021
"eslint-plugin-import": "2.27.5",
2122
"eslint-plugin-jest": "27.2.1",
2223
"eslint-plugin-jsdoc": "43.0.3",

0 commit comments

Comments
 (0)