From 94e163005bfbdc926d0136febfac3ffb29695f26 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Jan 2024 18:11:01 +0000 Subject: [PATCH] [CI/CD] Add eslint workflow (#244) * Add eslint command Signed-off-by: Ryan Liang * Update snapshot Signed-off-by: Ryan Liang --------- Signed-off-by: Ryan Liang (cherry picked from commit 6408277c7f569f4fabe2eb6b5ef0cf826d3bba9c) Signed-off-by: github-actions[bot] --- .cypress/.eslintrc.js | 17 +++ .eslintignore | 7 + .eslintrc.js | 59 ++++++++ .github/workflows/lint.yml | 79 +++++++++++ package.json | 3 +- .../Main/__snapshots__/main.test.tsx.snap | 24 +++- .../__snapshots__/QueryResults.test.tsx.snap | 108 ++++++++++++--- .../QueryResultsBody.test.tsx.snap | 96 ++++++++++--- .../acceleration_index_flyout.test.tsx.snap | 48 +++++-- .../__snapshots__/table_view.test.tsx.snap | 126 +++++++++++++++--- .../create_acceleration.test.tsx.snap | 108 ++++++++++++--- .../create_acceleration_header.test.tsx.snap | 6 +- .../define_index_options.test.tsx.snap | 6 +- .../index_setting_options.test.tsx.snap | 12 +- .../index_type_selector.test.tsx.snap | 12 +- .../source_selector.test.tsx.snap | 18 ++- .../query_visual_editor.test.tsx.snap | 48 +++++-- .../add_column_popover.test.tsx.snap | 6 +- .../column_expression.test.tsx.snap | 6 +- .../materialized_view_builder.test.tsx.snap | 6 +- .../add_fields_modal.test.tsx.snap | 36 ++++- .../delete_fields_modal.test.tsx.snap | 60 +++++++-- .../skipping_index_builder.test.tsx.snap | 42 +++++- tslint.yaml | 29 ---- 24 files changed, 804 insertions(+), 158 deletions(-) create mode 100644 .cypress/.eslintrc.js create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 .github/workflows/lint.yml delete mode 100644 tslint.yaml diff --git a/.cypress/.eslintrc.js b/.cypress/.eslintrc.js new file mode 100644 index 00000000..26edd9be --- /dev/null +++ b/.cypress/.eslintrc.js @@ -0,0 +1,17 @@ +module.exports = { + root: true, + extends: ['plugin:cypress/recommended'], + env: { + 'cypress/globals': true, + }, + plugins: ['cypress'], + rules: { + // Add cypress specific rules here + 'cypress/no-assigning-return-values': 'error', + 'cypress/no-unnecessary-waiting': 'error', + 'cypress/assertion-before-screenshot': 'warn', + 'cypress/no-force': 'warn', + 'cypress/no-async-tests': 'error', + }, + }; + \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..c5e1946d --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +node_modules +/data +/build +/target +/.eslintrc.js +/cypress.config.js +!.cypress/ diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..12f093d2 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +const LICENSE_HEADER = `/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */`; + +module.exports = { + root: true, + extends: [ + '@elastic/eslint-config-kibana', + 'plugin:@elastic/eui/recommended', + 'plugin:react-hooks/recommended', + 'plugin:jest/recommended', + 'plugin:prettier/recommended', + ], + + rules: { + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + '@osd/eslint/no-restricted-paths': [ + 'error', + { + basePath: __dirname, + zones: [ + { + target: ['(public|server)/**/*'], + from: ['../../packages/**/*','packages/**/*'], + }, + ], + }, + ], + }, + overrides: [ + { + files: ['**/*.{js,ts,tsx}'], + rules: { + '@typescript-eslint/no-explicit-any': 'warn', + 'no-console': 0, + '@osd/eslint/require-license-header': [ + 'error', + { + licenses: [LICENSE_HEADER], + }, + ], + }, + }, + ], + "ignorePatterns": ["**/*.d.ts"] +}; diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..06d08f26 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,79 @@ +name: Lint + +on: [pull_request] + +env: + PLUGIN_NAME: dashboards-query-workbench + OPENSEARCH_DASHBOARDS_VERSION: "main" + +jobs: + build: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout OpenSearch Dashboards + uses: actions/checkout@v2 + with: + repository: opensearch-project/Opensearch-Dashboards + ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }} + path: OpenSearch-Dashboards + + - name: Checkout dashboards query workbench + uses: actions/checkout@v2 + with: + path: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} + fetch-depth: 0 + + - name: Get node and yarn versions + working-directory: ${{ env.WORKING_DIR }} + id: versions_step + run: | + echo "::set-output name=node_version::$(cat ./OpenSearch-Dashboards/.nvmrc | cut -d"." -f1)" + echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")" + + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: ${{ steps.versions_step.outputs.node_version }} + registry-url: "https://registry.npmjs.org" + + - name: Install correct yarn version for OpenSearch Dashboards + run: | + npm uninstall -g yarn + echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}" + npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }} + + - name: Bootstrap the plugin + working-directory: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} + run: yarn osd bootstrap + + - name: Get list of changed files using GitHub Action + uses: lots0logs/gh-action-get-changed-files@2.2.2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Check Changes of Files + run: | + echo "FILES_MODIFIED=$(cat ${HOME}/files_modified.json)" + echo "FILES_ADDED=$(cat ${HOME}/files_added.json)" + echo "FILES_RENAMED=$(cat ${HOME}/files_renamed.json)" + echo "FILES_DELETED=$(cat ${HOME}/files_deleted.json)" + + - name: Lint Changed Files + run: | + jq -r '.[]' ${HOME}/files_modified.json ${HOME}/files_added.json | sort | uniq > /tmp/changed_files.txt + CHANGED_FILES=$(cat /tmp/changed_files.txt) + echo "These are the changed files: $CHANGED_FILES" + if [[ -n "$CHANGED_FILES" ]]; then + echo "Linting changed files..." + while IFS= read -r file; do + if [[ $file == *.js || $file == *.ts || $file == *.tsx ]]; then + echo "linting file $file" + yarn lint "$file" + fi + done < /tmp/changed_files.txt + else + echo "No matched files to lint." + fi + working-directory: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} diff --git a/package.json b/package.json index 6fec7b79..2c8af3ca 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "scripts": { "osd": "node ../../scripts/osd", "opensearch": "node ../../scripts/opensearch", - "lint": "tslint workbench", + "lint:es": "node ../../scripts/eslint", + "lint": "yarn lint:es", "start": "plugin-helpers start", "test:server": "plugin-helpers test:server", "test:browser": "plugin-helpers test:browser", diff --git a/public/components/Main/__snapshots__/main.test.tsx.snap b/public/components/Main/__snapshots__/main.test.tsx.snap index 63d0698f..b2103f80 100644 --- a/public/components/Main/__snapshots__/main.test.tsx.snap +++ b/public/components/Main/__snapshots__/main.test.tsx.snap @@ -8211,7 +8211,11 @@ exports[`
spec renders the component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -8308,7 +8312,11 @@ exports[`
spec renders the component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -8348,7 +8356,11 @@ exports[`
spec renders the component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
spec renders the component 1`] = ` viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + spec renders async query failure component 1`] = viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
@@ -9741,7 +9745,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -9930,7 +9938,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
@@ -10000,7 +10012,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -10039,7 +10055,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -10519,7 +10539,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -10896,7 +10920,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -11273,7 +11301,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -11650,7 +11682,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -12027,7 +12063,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -12404,7 +12444,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -12781,7 +12825,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -13158,7 +13206,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -13535,7 +13587,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -13912,7 +13968,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -14299,7 +14359,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -14334,7 +14398,11 @@ exports[` spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
    spec renders the component with mock query re viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/QueryResults/__snapshots__/QueryResultsBody.test.tsx.snap b/public/components/QueryResults/__snapshots__/QueryResultsBody.test.tsx.snap index 510be5ee..c2a1fd09 100644 --- a/public/components/QueryResults/__snapshots__/QueryResultsBody.test.tsx.snap +++ b/public/components/QueryResults/__snapshots__/QueryResultsBody.test.tsx.snap @@ -62,7 +62,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -101,7 +105,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -581,7 +589,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -958,7 +970,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1335,7 +1351,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1712,7 +1732,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -2089,7 +2113,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -2466,7 +2494,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -2843,7 +2875,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -3220,7 +3256,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -3597,7 +3637,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -3974,7 +4018,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -4351,7 +4399,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -4738,7 +4790,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -4773,7 +4829,11 @@ exports[` spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
      spec renders component with mock QueryResults data viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/SQLPage/__tests__/__snapshots__/acceleration_index_flyout.test.tsx.snap b/public/components/SQLPage/__tests__/__snapshots__/acceleration_index_flyout.test.tsx.snap index 5f635691..116193f0 100644 --- a/public/components/SQLPage/__tests__/__snapshots__/acceleration_index_flyout.test.tsx.snap +++ b/public/components/SQLPage/__tests__/__snapshots__/acceleration_index_flyout.test.tsx.snap @@ -668,7 +668,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
      + > + + @@ -846,7 +854,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -874,7 +886,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -956,7 +972,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
      + > + + @@ -1145,7 +1169,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1181,7 +1209,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/SQLPage/__tests__/__snapshots__/table_view.test.tsx.snap b/public/components/SQLPage/__tests__/__snapshots__/table_view.test.tsx.snap index b16a4bf3..855b000c 100644 --- a/public/components/SQLPage/__tests__/__snapshots__/table_view.test.tsx.snap +++ b/public/components/SQLPage/__tests__/__snapshots__/table_view.test.tsx.snap @@ -109,7 +109,11 @@ exports[`Render databases in tree fetches and displays indicies when datasource viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + + + > + +
      + > + + @@ -214,7 +222,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
      @@ -304,7 +316,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
      @@ -394,7 +410,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -456,7 +476,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -527,7 +551,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -831,7 +859,11 @@ Array [ viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
      + > + + @@ -1168,7 +1204,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
      + > + + @@ -1372,7 +1416,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
      @@ -1489,7 +1537,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1606,7 +1658,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1671,7 +1727,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1769,7 +1829,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -2096,7 +2160,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
      + > + + diff --git a/public/components/acceleration/create/__tests__/__snapshots__/create_acceleration_header.test.tsx.snap b/public/components/acceleration/create/__tests__/__snapshots__/create_acceleration_header.test.tsx.snap index e722b161..ca26536f 100644 --- a/public/components/acceleration/create/__tests__/__snapshots__/create_acceleration_header.test.tsx.snap +++ b/public/components/acceleration/create/__tests__/__snapshots__/create_acceleration_header.test.tsx.snap @@ -45,7 +45,11 @@ exports[`Acceleration header renders acceleration flyout header 1`] = ` viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/acceleration/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap b/public/components/acceleration/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap index 7eef9e2f..15915e36 100644 --- a/public/components/acceleration/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap +++ b/public/components/acceleration/selectors/__tests__/__snapshots__/define_index_options.test.tsx.snap @@ -188,7 +188,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
      + > + + @@ -146,7 +150,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
      diff --git a/public/components/acceleration/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap b/public/components/acceleration/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap index aa035061..7c9a22d4 100644 --- a/public/components/acceleration/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap +++ b/public/components/acceleration/selectors/__tests__/__snapshots__/index_type_selector.test.tsx.snap @@ -36,7 +36,11 @@ exports[`Index type selector components renders type selector with default optio viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -134,7 +138,11 @@ exports[`Index type selector components renders type selector with default optio viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/acceleration/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap b/public/components/acceleration/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap index 23129c8e..8daa8dce 100644 --- a/public/components/acceleration/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap +++ b/public/components/acceleration/selectors/__tests__/__snapshots__/source_selector.test.tsx.snap @@ -128,7 +128,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -245,7 +249,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -362,7 +370,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/acceleration/visual_editors/__tests__/__snapshots__/query_visual_editor.test.tsx.snap b/public/components/acceleration/visual_editors/__tests__/__snapshots__/query_visual_editor.test.tsx.snap index 3a281f7a..c0f17a0c 100644 --- a/public/components/acceleration/visual_editors/__tests__/__snapshots__/query_visual_editor.test.tsx.snap +++ b/public/components/acceleration/visual_editors/__tests__/__snapshots__/query_visual_editor.test.tsx.snap @@ -386,7 +386,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -706,7 +710,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -745,7 +753,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -864,7 +876,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -903,7 +919,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -947,7 +967,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -984,7 +1008,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
        + > + + diff --git a/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/add_column_popover.test.tsx.snap b/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/add_column_popover.test.tsx.snap index ffb0224d..72374445 100644 --- a/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/add_column_popover.test.tsx.snap +++ b/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/add_column_popover.test.tsx.snap @@ -27,7 +27,11 @@ exports[`Column popover components in materialized view renders column popover c viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/column_expression.test.tsx.snap b/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/column_expression.test.tsx.snap index 61725510..8812acbe 100644 --- a/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/column_expression.test.tsx.snap +++ b/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/column_expression.test.tsx.snap @@ -78,7 +78,11 @@ exports[`Column expression components in materialized view renders column expres viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/materialized_view_builder.test.tsx.snap b/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/materialized_view_builder.test.tsx.snap index c3ae3b8d..629d885d 100644 --- a/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/materialized_view_builder.test.tsx.snap +++ b/public/components/acceleration/visual_editors/materialized_view/__tests__/__snapshots__/materialized_view_builder.test.tsx.snap @@ -74,7 +74,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/add_fields_modal.test.tsx.snap b/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/add_fields_modal.test.tsx.snap index f2f42748..e2b1b685 100644 --- a/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/add_fields_modal.test.tsx.snap +++ b/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/add_fields_modal.test.tsx.snap @@ -34,7 +34,11 @@ exports[`Add fields modal in skipping index renders add fields modal in skipping viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
        + > + +
        @@ -163,7 +171,11 @@ exports[`Add fields modal in skipping index renders add fields modal in skipping viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -385,7 +397,11 @@ exports[`Add fields modal in skipping index renders add fields modal in skipping viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
        + > + +
        @@ -521,7 +541,11 @@ exports[`Add fields modal in skipping index renders add fields modal in skipping viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + diff --git a/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/delete_fields_modal.test.tsx.snap b/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/delete_fields_modal.test.tsx.snap index 52bc9157..aeff0d12 100644 --- a/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/delete_fields_modal.test.tsx.snap +++ b/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/delete_fields_modal.test.tsx.snap @@ -34,7 +34,11 @@ exports[`Delete fields modal in skipping index renders delete fields modal in sk viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
        + > + +
        @@ -163,7 +171,11 @@ exports[`Delete fields modal in skipping index renders delete fields modal in sk viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -410,7 +422,11 @@ exports[`Delete fields modal in skipping index renders delete fields modal in sk viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
        + > + +
        @@ -546,7 +566,11 @@ exports[`Delete fields modal in skipping index renders delete fields modal in sk viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -1335,7 +1359,11 @@ exports[`Delete fields modal in skipping index renders delete fields modal in sk viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" - /> + > + +
          + > + + @@ -2065,7 +2097,11 @@ exports[`Delete fields modal in skipping index renders delete fields modal in sk viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
            + > + + diff --git a/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/skipping_index_builder.test.tsx.snap b/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/skipping_index_builder.test.tsx.snap index cc72fdd4..77fdeab5 100644 --- a/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/skipping_index_builder.test.tsx.snap +++ b/public/components/acceleration/visual_editors/skipping_index/__tests__/__snapshots__/skipping_index_builder.test.tsx.snap @@ -464,7 +464,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -503,7 +507,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -622,7 +630,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -661,7 +673,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -705,7 +721,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + + @@ -742,7 +762,11 @@ Array [ viewBox="0 0 16 16" width={16} xmlns="http://www.w3.org/2000/svg" - /> + > + +
              + > + + diff --git a/tslint.yaml b/tslint.yaml deleted file mode 100644 index 89fec1d0..00000000 --- a/tslint.yaml +++ /dev/null @@ -1,29 +0,0 @@ -extends: - - tslint:recommended - - tslint-plugin-prettier - - tslint-config-prettier - -rulesDirectory: - - tslint-plugin-prettier - - src/dev/tslint/rules - -rules: - prettier: true - object-literal-sort-keys: false - interface-name: false - no-default-export: true - require-license-header: - - true - - |- - /* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - disallow-license-header: - - true - - |- - /* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */