diff --git a/src/Umbraco.Web.UI.Client/.eslintrc.json b/src/Umbraco.Web.UI.Client/.eslintrc.json index a3bfe0790b..0d13a00b4d 100644 --- a/src/Umbraco.Web.UI.Client/.eslintrc.json +++ b/src/Umbraco.Web.UI.Client/.eslintrc.json @@ -23,6 +23,7 @@ "plugin:@typescript-eslint/recommended", "plugin:lit/recommended", "plugin:lit-a11y/recommended", + "plugin:storybook/recommended", "prettier" ], "env": { diff --git a/src/Umbraco.Web.UI.Client/.github/workflows/build_test.yml b/src/Umbraco.Web.UI.Client/.github/workflows/build_test.yml index f5f425f12f..23e2c23745 100644 --- a/src/Umbraco.Web.UI.Client/.github/workflows/build_test.yml +++ b/src/Umbraco.Web.UI.Client/.github/workflows/build_test.yml @@ -4,6 +4,8 @@ name: Build and test on: + push: + branches: [ main ] pull_request: branches: [ main ] diff --git a/src/Umbraco.Web.UI.Client/.github/workflows/codeql.yml b/src/Umbraco.Web.UI.Client/.github/workflows/codeql.yml new file mode 100644 index 0000000000..796d548755 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/.github/workflows/codeql.yml @@ -0,0 +1,56 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + schedule: + - cron: '33 2 * * 1' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index ddfd2ada3d..ed4007625b 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -43,8 +43,8 @@ "eslint-import-resolver-typescript": "^3.4.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-lit": "^1.6.1", - "eslint-plugin-lit-a11y": "^2.2.1", - "eslint-plugin-storybook": "^0.6.2", + "eslint-plugin-lit-a11y": "^2.2.2", + "eslint-plugin-storybook": "^0.6.3", "lit-html": "^2.2.7", "msw": "^0.44.2", "msw-storybook-addon": "^1.6.3", @@ -12788,9 +12788,9 @@ } }, "node_modules/eslint-plugin-lit-a11y": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-2.2.1.tgz", - "integrity": "sha512-Ao2MP3NjMGON8x8sdwGgmVW79MiQ4nOB7OQzodLPk4sljGAvdyXulyGVNY6PGWfIPVee+3X262z4Aq2poXO+LA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-2.2.2.tgz", + "integrity": "sha512-9dJfnwPOOA6x7Ow/+GFoOt1hr4mSNrF6KBWQ2OFFAY/9aBYtyBX4fRbpxqS2y3ld66/bjWru2+LGWgNVr5GxzQ==", "dev": true, "dependencies": { "aria-query": "^4.2.2", @@ -12816,14 +12816,15 @@ "dev": true }, "node_modules/eslint-plugin-storybook": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.6.2.tgz", - "integrity": "sha512-lL69axZtp+IhF3Y812dQL9JJh9dsuInrdVA4ARAAtcyEOlvDOQXBNLwaFizche/jah7kfuLNhvkR62+UEG9KWA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.6.3.tgz", + "integrity": "sha512-e0zIqHsgUz3Bs3PSyiYwCZ3QqyVmRgNQceBtYlnWXscCJLgdvBH8WwqBOvZUb3SAB4ZTYDLG3GMqpxI6PJZwKg==", "dev": true, "dependencies": { "@storybook/csf": "^0.0.1", "@typescript-eslint/experimental-utils": "^5.3.0", - "requireindex": "^1.1.0" + "requireindex": "^1.1.0", + "ts-dedent": "^2.2.0" }, "engines": { "node": "12.x || 14.x || >= 16" @@ -36744,9 +36745,9 @@ } }, "eslint-plugin-lit-a11y": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-2.2.1.tgz", - "integrity": "sha512-Ao2MP3NjMGON8x8sdwGgmVW79MiQ4nOB7OQzodLPk4sljGAvdyXulyGVNY6PGWfIPVee+3X262z4Aq2poXO+LA==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-lit-a11y/-/eslint-plugin-lit-a11y-2.2.2.tgz", + "integrity": "sha512-9dJfnwPOOA6x7Ow/+GFoOt1hr4mSNrF6KBWQ2OFFAY/9aBYtyBX4fRbpxqS2y3ld66/bjWru2+LGWgNVr5GxzQ==", "dev": true, "requires": { "aria-query": "^4.2.2", @@ -36771,14 +36772,15 @@ } }, "eslint-plugin-storybook": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.6.2.tgz", - "integrity": "sha512-lL69axZtp+IhF3Y812dQL9JJh9dsuInrdVA4ARAAtcyEOlvDOQXBNLwaFizche/jah7kfuLNhvkR62+UEG9KWA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.6.3.tgz", + "integrity": "sha512-e0zIqHsgUz3Bs3PSyiYwCZ3QqyVmRgNQceBtYlnWXscCJLgdvBH8WwqBOvZUb3SAB4ZTYDLG3GMqpxI6PJZwKg==", "dev": true, "requires": { "@storybook/csf": "^0.0.1", "@typescript-eslint/experimental-utils": "^5.3.0", - "requireindex": "^1.1.0" + "requireindex": "^1.1.0", + "ts-dedent": "^2.2.0" }, "dependencies": { "@storybook/csf": { diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 4fc34457dd..ada0fcba3a 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -68,8 +68,8 @@ "eslint-import-resolver-typescript": "^3.4.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-lit": "^1.6.1", - "eslint-plugin-lit-a11y": "^2.2.1", - "eslint-plugin-storybook": "^0.6.2", + "eslint-plugin-lit-a11y": "^2.2.2", + "eslint-plugin-storybook": "^0.6.3", "lit-html": "^2.2.7", "msw": "^0.44.2", "msw-storybook-addon": "^1.6.3",