Skip to content

Commit

Permalink
Merge branch 'master' into expand-resource-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Apr 15, 2024
2 parents b205b09 + 2cb9abb commit b94a64b
Show file tree
Hide file tree
Showing 321 changed files with 27,267 additions and 5,963 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/web/src/build
/web/src/profile.json
/bin
/storybook-static
/playwright/.cache
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:storybook/recommended',
],
rules: {
'no-else-return': ['error', { allowElseIf: false }],
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Checkout repository
uses: actions/checkout@v4

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: false
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.event.pull_request.draft == false
name: Label the PR size
steps:
- uses: codelytv/pr-size-labeler@54c3c1d94030222b5d7c46fe61ce7c83e6a51941
- uses: mastercactapus/pr-size-labeler@eb6a25f40d6a3327581aca35839b60d419e8019a # https://github.com/CodelyTV/pr-size-labeler/pull/61, updated with latest from main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: 'size/xs'
Expand All @@ -22,7 +22,8 @@ jobs:
l_label: 'size/l'
l_max_size: '500'
xl_label: 'size/xl'
fail_if_xl: 'false'
fail_if_xl: 'true'
ignore_deleted: 'true'
message_if_xl: >
This PR exceeds the recommended size of 500 lines.
Please make sure you are NOT addressing multiple issues with one PR.
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.zip
/test-results
/test/coverage/
/storybook-static

/cypress/

Expand Down Expand Up @@ -72,4 +73,9 @@ smoketest_db_dump

/.yarn
/.pnp.*
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

/.gitrev
28 changes: 28 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { StorybookConfig } from '@storybook/react-vite'

import { join, dirname } from 'path'

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')))
}
const config: StorybookConfig = {
staticDirs: ['./static'],
stories: ['../web/src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
name: getAbsolutePath('@storybook/react-vite'),
options: {},
},
docs: {
autodocs: 'tag',
},
}
export default config
3 changes: 3 additions & 0 deletions .storybook/msw.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { setupWorker } from 'msw'

export const worker = setupWorker()
29 changes: 29 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { Preview } from '@storybook/react'
import DefaultDecorator from '../web/src/app/storybook/decorators'
import { initialize, mswLoader } from 'msw-storybook-addon'
import {
handleDefaultConfig,
handleExpFlags,
} from '../web/src/app/storybook/graphql'

initialize({
onUnhandledRequest: 'bypass',
})

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
msw: {
handlers: [handleDefaultConfig, handleExpFlags()],
},
},
decorators: [DefaultDecorator],
loaders: [mswLoader],
}

export default preview
Loading

0 comments on commit b94a64b

Please sign in to comment.