From c5fdbfd62d404d01c099ee62e3182e8a9a50de62 Mon Sep 17 00:00:00 2001 From: hashicc <191911133+hashicc@users.noreply.github.com> Date: Thu, 13 Feb 2025 17:09:10 -0500 Subject: [PATCH] chore: fix eslint-related issues (#2690) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 🤖 add .eslintignore for e2e-tests directory * chore: 🤖 add auto-fixable eslint changes * chore: 🤖 make js tasks more explicit to avoid race conditions avoid having js files be in two separate concurrent branches where tasks could result in race-condition writes * chore: 🤖 expand .eslintignore to include more generated dirs * chore: 🤖 fix additional lint-staged tasks Fix additional lint-staged tasks that could result in race conditions --- addons/api/package.json | 4 ++-- addons/auth/package.json | 4 ++-- addons/core/package.json | 4 ++-- addons/rose/package.json | 6 +++--- e2e-tests/.eslintignore | 4 ++++ e2e-tests/desktop/tests/credentials.spec.js | 4 ++-- e2e-tests/package.json | 4 ++-- ui/admin/package.json | 4 ++-- ui/desktop/package.json | 4 ++-- 9 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 e2e-tests/.eslintignore diff --git a/addons/api/package.json b/addons/api/package.json index d3a0790c6..bacd7c986 100644 --- a/addons/api/package.json +++ b/addons/api/package.json @@ -82,8 +82,8 @@ "configPath": "tests/dummy/config" }, "lint-staged": { - "*.js": "eslint --fix", + "*.js": ["eslint --fix", "prettier --write"], "*.hbs": "ember-template-lint --fix", - "*.{js,scss,yaml}": "prettier --write" + "*.{scss,yaml}": "prettier --write" } } diff --git a/addons/auth/package.json b/addons/auth/package.json index e0397fbe9..14d636eae 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -77,8 +77,8 @@ "configPath": "tests/dummy/config" }, "lint-staged": { - "*.js": "eslint --fix", + "*.js": ["eslint --fix", "prettier --write"], "*.hbs": "ember-template-lint --fix", - "*.{js,scss,yaml}": "prettier --write" + "*.{scss,yaml}": "prettier --write" } } diff --git a/addons/core/package.json b/addons/core/package.json index 966feb60c..cec5d7494 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -98,8 +98,8 @@ "configPath": "tests/dummy/config" }, "lint-staged": { - "*.js": "eslint --fix", + "*.js": ["eslint --fix", "prettier --write"], "*.hbs": "ember-template-lint --fix", - "*.{js,scss,yaml}": "prettier --write" + "*.{scss,yaml}": "prettier --write" } } diff --git a/addons/rose/package.json b/addons/rose/package.json index 70bf37b99..1db948eb8 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -107,9 +107,9 @@ "configPath": "tests/dummy/config" }, "lint-staged": { - "*.js": "eslint --fix", + "*.js": ["eslint --fix", "prettier --write"], "*.hbs": "ember-template-lint --fix", - "*.scss": "stylelint --fix", - "*.{js,scss,mdx,yaml}": "prettier --write" + "*.scss": ["stylelint --fix", "prettier --write"], + "*.{mdx,yaml}": "prettier --write" } } diff --git a/e2e-tests/.eslintignore b/e2e-tests/.eslintignore new file mode 100644 index 000000000..72f0a8515 --- /dev/null +++ b/e2e-tests/.eslintignore @@ -0,0 +1,4 @@ +# e2e test output +admin/artifacts +desktop/artifacts +playwright-report diff --git a/e2e-tests/desktop/tests/credentials.spec.js b/e2e-tests/desktop/tests/credentials.spec.js index 4fc0058cd..9094d8927 100644 --- a/e2e-tests/desktop/tests/credentials.spec.js +++ b/e2e-tests/desktop/tests/credentials.spec.js @@ -303,11 +303,11 @@ test.describe('Credential Panel tests', () => { // Empty string and null should not be visible await expect( authedPage.getByRole('listitem').filter({ hasText: 'nested.key3' }), - ).not.toBeVisible(); + ).toBeHidden(); await expect( authedPage.getByRole('listitem').filter({ hasText: 'nested.key4' }), - ).not.toBeVisible(); + ).toBeHidden(); await authedPage .getByRole('listitem') diff --git a/e2e-tests/package.json b/e2e-tests/package.json index e1a940ece..e0b87ea4e 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -42,7 +42,7 @@ "node": "20.* || 22.*" }, "lint-staged": { - "*.js": "eslint --fix", - "*.{js,scss,yaml}": "prettier --write" + "*.js": ["eslint --fix", "prettier --write"], + "*.{scss,yaml}": "prettier --write" } } diff --git a/ui/admin/package.json b/ui/admin/package.json index 4e3943b7b..7090a7165 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -107,8 +107,8 @@ "edition": "octane" }, "lint-staged": { - "*.js": "eslint --fix", + "*.js": ["eslint --fix", "prettier --write"], "*.hbs": "ember-template-lint --fix", - "*.{js,scss,yaml}": "prettier --write" + "*.{scss,yaml}": "prettier --write" } } diff --git a/ui/desktop/package.json b/ui/desktop/package.json index b7fcb432e..6ddca40ae 100644 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -119,8 +119,8 @@ "edition": "octane" }, "lint-staged": { - "*.js": "eslint --fix", + "*.js": ["eslint --fix", "prettier --write"], "*.hbs": "ember-template-lint --fix", - "*.{js,scss,yaml}": "prettier --write" + "*.{scss,yaml}": "prettier --write" } }