DEV: Update CI workflows (#227)

DEV: Update CI workflows (#227)

  • DEV: Fix linting issues

Co-authored-by: Jarek Radosz jradosz@gmail.com

diff --git a/.github/workflows/plugin-linting.yml b/.github/workflows/plugin-linting.yml
index 51b9b82..92c6e3e 100644
--- a/.github/workflows/plugin-linting.yml
+++ b/.github/workflows/plugin-linting.yml
@@ -37,11 +37,10 @@ jobs:
         shell: bash
         run: |
           yarn prettier -v
-          shopt -s extglob
-          if ls assets/**/*.@(scss|js|es6) &> /dev/null; then
+          if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
             yarn prettier --list-different "assets/**/*.{scss,js,es6}"
           fi
-          if ls test/**/*.@(js|es6) &> /dev/null; then
+          if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
             yarn prettier --list-different "test/**/*.{js,es6}"
           fi
 
diff --git a/.github/workflows/plugin-tests.yml b/.github/workflows/plugin-tests.yml
index a9bdda9..a5eff7c 100644
--- a/.github/workflows/plugin-tests.yml
+++ b/.github/workflows/plugin-tests.yml
@@ -111,8 +111,7 @@ jobs:
         id: check_spec
         shell: bash
         run: |
-          shopt -s extglob
-          if ls plugins/${{ github.event.repository.name }}/spec/**/*.@(rb) &> /dev/null; then
+          if [ 0 -lt $(find plugins/${{ github.event.repository.name }}/spec -type f -name "*.rb" 2> /dev/null | wc -l) ]; then
             echo "::set-output name=files_exist::true"
           fi
 
@@ -124,8 +123,7 @@ jobs:
         id: check_qunit
         shell: bash
         run: |
-          shopt -s extglob
-          if ls plugins/${{ github.event.repository.name }}/test/javascripts/**/*.@(js|es6) &> /dev/null; then
+          if [ 0 -lt $(find plugins/${{ github.event.repository.name }}/test/javascripts -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
             echo "::set-output name=files_exist::true"
           fi
 
diff --git a/assets/javascripts/discourse/widgets/chat-header-icon.js b/assets/javascripts/discourse/widgets/chat-header-icon.js
index e3fd8c5..5416711 100644
--- a/assets/javascripts/discourse/widgets/chat-header-icon.js
+++ b/assets/javascripts/discourse/widgets/chat-header-icon.js
@@ -67,10 +67,7 @@ export default createWidget("header-chat-link", {
       return window.open(getURL("/chat"), "_blank").focus();
     }
 
-    if (
-      this.site.mobileView ||
-      this.chat.getSidebarActive()
-    ) {
+    if (this.site.mobileView || this.chat.getSidebarActive()) {
       DiscourseURL.routeTo("/chat");
     } else {
       this.appEvents.trigger("chat:toggle-open");
diff --git a/assets/stylesheets/common/common.scss b/assets/stylesheets/common/common.scss
index 5cb8af0..4627784 100644
--- a/assets/stylesheets/common/common.scss
+++ b/assets/stylesheets/common/common.scss
@@ -905,7 +905,8 @@ $float-height: 530px;
   .chat-name {
     color: var(--primary-high);
   }
-  .topic-chat-name, .tag-chat-name {
+  .topic-chat-name,
+  .tag-chat-name {
     margin: 0 0 0 0.25em;
   }
   .d-icon-lock {

GitHub sha: f68ede9334cfc40831993895554808220ac08760

This commit appears in #227 which was approved by CvX. It was merged by CvX.