Skip to content

Commit

Permalink
separate linting rules for cypress (#1344)
Browse files Browse the repository at this point in the history
Signed-off-by: Eric <[email protected]>
  • Loading branch information
mengweieric authored Jan 9, 2024
1 parent b42aa2c commit 9a0fb3d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
16 changes: 16 additions & 0 deletions .cypress/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
extends: ['plugin:cypress/recommended'],
env: {
'cypress/globals': true,
},
plugins: ['cypress'],
rules: {
// Add cypress specific rules here
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'cypress/no-async-tests': 'error',
},
};
14 changes: 1 addition & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@ module.exports = {
'@elastic/eslint-config-kibana',
'plugin:@elastic/eui/recommended',
'plugin:react-hooks/recommended',
"plugin:cypress/recommended",
'plugin:jest/recommended',
'plugin:prettier/recommended',
],
env: {
'cypress/globals': true,
},
plugins: [
'cypress',
],

rules: {
'@typescript-eslint/no-unused-vars': [
'error',
Expand All @@ -45,12 +39,6 @@ module.exports = {
],
},
],
// Add cypress specific rules here
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'cypress/no-async-tests': 'error',
},
overrides: [
{
Expand Down

0 comments on commit 9a0fb3d

Please sign in to comment.