Skip to content

Commit

Permalink
separate linting rules for cypress (#1344) (#1348)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9a0fb3d)

Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 21035f7 commit 7a8b73e
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 7a8b73e

Please sign in to comment.