Skip to content

Commit 082391b

Browse files
authored
Add cy files to our overrides for tests and non-production code to not include our extra rules that are not needed for that (#21)
For example, we don't need to add test selectors for buttons in our cy tests. This will make it so we don't see these warnings (and the like) in our apps that will have cypress testing: ![image](https://github.com/user-attachments/assets/02bc2b5c-be23-4695-8cb5-02242c2ff529) ![image](https://github.com/user-attachments/assets/f6aea969-7694-47c1-a481-44edbf5bbb62) ## To-Dos - [x] Run tests (part of pre-push hook) - [x] Update demo and tests, if linting configuration is being changed - [ ] Update documentation & README - [x] Increment package.json version
1 parent caa8a80 commit 082391b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

es6.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,16 @@ module.exports = {
9898
},
9999
overrides: [
100100
{
101-
files: ['*.stories.*', '*test*', '**/test/**', '**/*mock*/**', '*mock*', '**/setupTests.*', '**/fixtures/**'],
101+
files: [
102+
'*.stories.*',
103+
'*test*',
104+
'**/test/**',
105+
'**/*mock*/**',
106+
'*mock*',
107+
'**/setupTests.*',
108+
'**/fixtures/**',
109+
'**/*.cy.*',
110+
],
102111
rules: {
103112
'no-alert': 'off',
104113
'no-console': 'off',
@@ -114,6 +123,7 @@ module.exports = {
114123
'test-selectors/onKeyUp': 'off',
115124
'test-selectors/onSubmit': 'off',
116125
'import/prefer-default-export': 'off',
126+
'promise/catch-or-return': 'off',
117127
},
118128
},
119129
],

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fs/eslint-config-tree",
3-
"version": "6.1.0",
3+
"version": "6.1.1",
44
"description": "Shared Tree configuration that contains overrides and enhancements on top of the base frontier configuration.",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)