From 4124b4bb785aebfb06b32df76308f5d4776b38f8 Mon Sep 17 00:00:00 2001 From: Jordi Kloosterboer Date: Fri, 27 Sep 2024 14:04:56 -0600 Subject: [PATCH 1/2] Add cy files to our overrides for tests and non-production code to not include our extra rules that are not needed for that. For example, we don't need to add test selectors for buttons in our cy tests. --- es6.js | 11 ++++++++++- package.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/es6.js b/es6.js index daeb262..9ecc314 100644 --- a/es6.js +++ b/es6.js @@ -98,7 +98,16 @@ module.exports = { }, overrides: [ { - files: ['*.stories.*', '*test*', '**/test/**', '**/*mock*/**', '*mock*', '**/setupTests.*', '**/fixtures/**'], + files: [ + '*.stories.*', + '*test*', + '**/test/**', + '**/*mock*/**', + '*mock*', + '**/setupTests.*', + '**/fixtures/**', + '**/*.cy.*', + ], rules: { 'no-alert': 'off', 'no-console': 'off', diff --git a/package.json b/package.json index 67019a1..472e067 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fs/eslint-config-tree", - "version": "6.1.0", + "version": "6.1.1", "description": "Shared Tree configuration that contains overrides and enhancements on top of the base frontier configuration.", "main": "index.js", "repository": { From 2c8dcb08d7130c2de0e8634be13aa439f94c7eff Mon Sep 17 00:00:00 2001 From: Jordi Kloosterboer Date: Fri, 27 Sep 2024 14:09:25 -0600 Subject: [PATCH 2/2] Add promise/catch-or-return to disabled rules for cy and non-production code --- es6.js | 1 + 1 file changed, 1 insertion(+) diff --git a/es6.js b/es6.js index 9ecc314..b684d77 100644 --- a/es6.js +++ b/es6.js @@ -123,6 +123,7 @@ module.exports = { 'test-selectors/onKeyUp': 'off', 'test-selectors/onSubmit': 'off', 'import/prefer-default-export': 'off', + 'promise/catch-or-return': 'off', }, }, ],