Skip to content

Commit 9a0fb3d

Browse files
authored
separate linting rules for cypress (opensearch-project#1344)
Signed-off-by: Eric <[email protected]>
1 parent b42aa2c commit 9a0fb3d

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

.cypress/.eslintrc.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['plugin:cypress/recommended'],
4+
env: {
5+
'cypress/globals': true,
6+
},
7+
plugins: ['cypress'],
8+
rules: {
9+
// Add cypress specific rules here
10+
'cypress/no-assigning-return-values': 'error',
11+
'cypress/no-unnecessary-waiting': 'error',
12+
'cypress/assertion-before-screenshot': 'warn',
13+
'cypress/no-force': 'warn',
14+
'cypress/no-async-tests': 'error',
15+
},
16+
};

.eslintrc.js

+1-13
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,10 @@ module.exports = {
1414
'@elastic/eslint-config-kibana',
1515
'plugin:@elastic/eui/recommended',
1616
'plugin:react-hooks/recommended',
17-
"plugin:cypress/recommended",
1817
'plugin:jest/recommended',
1918
'plugin:prettier/recommended',
2019
],
21-
env: {
22-
'cypress/globals': true,
23-
},
24-
plugins: [
25-
'cypress',
26-
],
20+
2721
rules: {
2822
'@typescript-eslint/no-unused-vars': [
2923
'error',
@@ -45,12 +39,6 @@ module.exports = {
4539
],
4640
},
4741
],
48-
// Add cypress specific rules here
49-
'cypress/no-assigning-return-values': 'error',
50-
'cypress/no-unnecessary-waiting': 'error',
51-
'cypress/assertion-before-screenshot': 'warn',
52-
'cypress/no-force': 'warn',
53-
'cypress/no-async-tests': 'error',
5442
},
5543
overrides: [
5644
{

0 commit comments

Comments
 (0)