From 20a5faee75fe3f3ae3e9b93238e9e872286aea05 Mon Sep 17 00:00:00 2001 From: Shenoy Pratik Date: Wed, 13 Dec 2023 14:47:31 -0800 Subject: [PATCH] Onboard Stylelint (#229) (#300) (cherry picked from commit 37a3545ed266794744f1ea5e4f593c982b0341e2) Co-authored-by: Matt Provost --- .github/workflows/test-and-build-workflow.yml | 27 +++++++++++-------- gantt-chart/package.json | 1 + gantt-chart/public/index.scss | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-and-build-workflow.yml b/.github/workflows/test-and-build-workflow.yml index 6e8ebe1..ac54d01 100644 --- a/.github/workflows/test-and-build-workflow.yml +++ b/.github/workflows/test-and-build-workflow.yml @@ -1,11 +1,10 @@ - name: Test and Build Gantt Chart on: [pull_request, push] env: PLUGIN_NAME: gantt-chart-dashboards - OPENSEARCH_VERSION: '2.x' + OPENSEARCH_VERSION: "2.x" OPENSEARCH_PLUGIN_VERSION: 2.10.0.0 jobs: @@ -67,7 +66,6 @@ jobs: path: ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart/build windows-build: - runs-on: windows-latest steps: - name: Checkout Plugin @@ -86,8 +84,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version-file: './dashboards-visualizations/OpenSearch-Dashboards/.nvmrc' - registry-url: 'https://registry.npmjs.org' + node-version-file: "./dashboards-visualizations/OpenSearch-Dashboards/.nvmrc" + registry-url: "https://registry.npmjs.org" - name: Install Yarn # Need to use bash to avoid having a windows/linux specific step @@ -109,6 +107,11 @@ jobs: cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart yarn osd bootstrap + - name: Run Stylelint + run: | + cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart + yarn lint:style + - name: Test run: | cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart @@ -125,9 +128,8 @@ jobs: with: name: gantt-chart-windows path: ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart/build - - macos-build: + macos-build: runs-on: macos-latest steps: @@ -144,8 +146,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version-file: './dashboards-visualizations/OpenSearch-Dashboards/.nvmrc' - registry-url: 'https://registry.npmjs.org' + node-version-file: "./dashboards-visualizations/OpenSearch-Dashboards/.nvmrc" + registry-url: "https://registry.npmjs.org" - name: Install Yarn # Need to use bash to avoid having a windows/linux specific step @@ -167,6 +169,11 @@ jobs: cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart yarn osd bootstrap + - name: Run Stylelint + run: | + cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart + yarn lint:style + - name: Test run: | cd ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart @@ -183,5 +190,3 @@ jobs: with: name: gantt-chart-macos path: ./dashboards-visualizations/OpenSearch-Dashboards/plugins/gantt-chart/build - - diff --git a/gantt-chart/package.json b/gantt-chart/package.json index c5a0969..06e88f3 100644 --- a/gantt-chart/package.json +++ b/gantt-chart/package.json @@ -6,6 +6,7 @@ "osd": "node ../../scripts/osd", "opensearch": "node ../../scripts/opensearch", "lint": "eslint .", + "lint:style": "node ../../scripts/stylelint", "build": "yarn plugin-helpers build", "plugin-helpers": "node ../../scripts/plugin_helpers", "test": "../../node_modules/.bin/jest --config ./test/jest.config.js", diff --git a/gantt-chart/public/index.scss b/gantt-chart/public/index.scss index 8b1e0cd..f92f361 100644 --- a/gantt-chart/public/index.scss +++ b/gantt-chart/public/index.scss @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -.embPanel__content[data-loading][data-type=plotlyGanttChart] { +.embPanel__content[data-loading][data-type="plotlyGanttChart"] { pointer-events: auto; filter: none; }