From 0123186f548285cd13f03057c53bf206c2157b8e Mon Sep 17 00:00:00 2001 From: Marius Tobiassen Bungum Date: Mon, 24 Jun 2024 12:54:11 +0200 Subject: [PATCH 1/6] :sparkles: Initial setup --- .env | 1 + .eslintignore | 12 + .eslintrc.cjs | 84 + .github/CODEOWNERS | 1 + .github/workflows/build.yaml | 21 + .github/workflows/build_storybook.yaml | 21 + .github/workflows/code_coverage.yaml | 21 + .github/workflows/lint.yaml | 21 + .github/workflows/npm_publish.yaml | 27 + .github/workflows/pull_request.yaml | 29 + .github/workflows/push.yml | 22 + .github/workflows/release.yaml | 33 + .github/workflows/test.yaml | 21 + .gitignore | 39 + .husky/pre-commit | 4 + .lintstagedrc.yaml | 1 + .prettierignore | 5 + .prettierrc.js | 19 + .run/All Tests.run.xml | 12 + .run/Code coverage.run.xml | 12 + .run/brute-coverage.run.xml | 12 + ...ild-and-use ToolsQualificationList.run.xml | 13 + .run/build-and-use acquire.run.xml | 13 + .run/build-and-use amplify-portal.run.xml | 13 + .run/build-and-use dasha.run.xml | 13 + ...uild-and-use petec-well-experience.run.xml | 13 + .run/build-and-use.run.xml | 12 + .run/build-storybook.run.xml | 12 + .run/build.run.xml | 12 + .run/lint.run.xml | 12 + .run/lint_fix.run.xml | 12 + .run/pretty.run.xml | 12 + .run/pretty_fix.run.xml | 12 + .run/setup.run.xml | 12 + .run/start.run.xml | 12 + .storybook/addons/GitHubSearchAddon/Panel.js | 185 + .../addons/GitHubSearchAddon/constants.js | 14 + .../addons/GitHubSearchAddon/manager.js | 14 + .storybook/amplifyTheme.js | 7 + .storybook/main.js | 47 + .storybook/manager.js | 8 + .storybook/preview-head.html | 11 + .storybook/preview.tsx | 38 + CONTRIBUTION.md | 3 + Dockerfile | 46 + LICENSE.md | 7 + README.md | 18 +- SECURITY.md | 16 + docker-compose.yaml | 9 + package-lock.json | 27217 ++++++++++++++++ package.json | 135 + proxy/nginx.conf | 39 + proxy/securityheaders.conf | 7 + radixconfig.yaml | 23 + rollup.config.mjs | 42 + secrets.sh | 3 + src/api/core/ApiError.ts | 28 + src/api/core/ApiRequestOptions.ts | 23 + src/api/core/ApiResult.ts | 10 + src/api/core/CancelablePromise.ts | 127 + src/api/core/OpenAPI.ts | 134 + src/api/core/request.ts | 346 + src/api/index.ts | 19 + src/api/models/AccessRole.ts | 4 + src/api/models/Applications.ts | 18 + src/api/models/CustomTutorialStep.ts | 10 + src/api/models/Feature.ts | 13 + src/api/models/FeatureToggleDto.ts | 10 + src/api/models/GenericTutorialStep.ts | 13 + src/api/models/GraphUser.ts | 10 + src/api/models/ReleaseNote.ts | 14 + src/api/models/ReleaseNotePatch.ts | 13 + .../ServiceNowIncidentAttachmentResponse.ts | 12 + src/api/models/ServiceNowIncidentResponse.ts | 19 + src/api/models/ServiceNowUrgency.ts | 10 + src/api/models/Tutorial.ts | 19 + src/api/models/TutorialPosition.ts | 12 + src/api/models/TutorialStepBase.ts | 10 + src/api/services/PortalService.ts | 100 + src/api/services/ReleaseNotesService.ts | 78 + src/api/services/TutorialService.ts | 36 + src/components/Feature.tsx | 25 + src/components/index.ts | 1 + src/components/mdx.d.ts | 4 + src/hooks/hooks.stories.tsx | 84 + src/hooks/index.ts | 13 + src/hooks/useFeatureToggling.test.tsx | 228 + src/hooks/useFeatureToggling.ts | 41 + src/hooks/useReleaseNotesQuery.ts | 21 + src/hooks/useSignalRMessages.ts | 227 + src/index.ts | 9 + src/intro.mdx | 27 + src/providers/AuthProvider/AuthProvider.tsx | 105 + .../AuthProvider/AuthProviderInner.tsx | 210 + src/providers/FeatureToggleProvider.tsx | 71 + src/providers/ReleaseNotesProvider.test.tsx | 289 + src/providers/ReleaseNotesProvider.tsx | 125 + .../TutorialProvider/TutorialDialog.tsx | 182 + .../TutorialProvider.const.ts | 8 + .../TutorialProvider.hooks.ts | 37 + .../TutorialProvider.stories.tsx | 202 + .../TutorialProvider.styles.ts | 92 + .../TutorialProvider.test.tsx | 537 + .../TutorialProvider/TutorialProvider.tsx | 217 + .../TutorialProvider.types.ts | 13 + .../TutorialProvider.utils.ts | 94 + .../TutorialProviderInner.tsx | 164 + .../TutorialStepIndicator.tsx | 75 + src/providers/TutorialStepsProvider.test.tsx | 38 + src/providers/TutorialStepsProvider.tsx | 83 + src/providers/index.ts | 11 + src/providers/providers.stories.tsx | 85 + src/storybook/InfoCard.tsx | 41 + src/storybook/Links.tsx | 178 + src/storybook/PropsTable.tsx | 11 + src/storybook/Stack.tsx | 34 + src/storybook/Story.tsx | 5 + src/storybook/index.ts | 6 + src/tests/browserMocks.ts | 140 + src/tests/setupTests.ts | 17 + src/tests/test-utils.ts | 15 + src/types/Environment.ts | 6 + src/types/Field.ts | 5 + src/types/Guidelines.ts | 17 + src/types/ReleaseNotes.ts | 33 + src/types/index.ts | 3 + src/utils/UtilStory.tsx | 33 + src/utils/auth.stories.tsx | 73 + src/utils/auth_environment.ts | 241 + src/utils/environment.stories.tsx | 56 + src/utils/index.ts | 3 + src/utils/localStorage.ts | 27 + src/utils/releaseNotes.test.ts | 79 + src/utils/releaseNotes.ts | 110 + src/vite-env.d.ts | 23 + static/Glitch_spritesheet.png | Bin 0 -> 995666 bytes static/Questioning_spritesheet.png | Bin 0 -> 184095 bytes static/amplify_logo.png | Bin 0 -> 19198 bytes static/amplify_logotype_dark.png | Bin 0 -> 10901 bytes tooling/brute-coverage.mjs | 39 + tooling/build-and-use.mjs | 135 + tooling/postinstall.js | 8 + tooling/taskrunner.mjs | 68 + tsconfig.build.json | 8 + tsconfig.json | 23 + vite.config.ts | 21 + vitest.config.ts | 64 + 147 files changed, 34406 insertions(+), 2 deletions(-) create mode 100644 .env create mode 100644 .eslintignore create mode 100644 .eslintrc.cjs create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/build_storybook.yaml create mode 100644 .github/workflows/code_coverage.yaml create mode 100644 .github/workflows/lint.yaml create mode 100644 .github/workflows/npm_publish.yaml create mode 100644 .github/workflows/pull_request.yaml create mode 100644 .github/workflows/push.yml create mode 100644 .github/workflows/release.yaml create mode 100644 .github/workflows/test.yaml create mode 100644 .gitignore create mode 100644 .husky/pre-commit create mode 100644 .lintstagedrc.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc.js create mode 100644 .run/All Tests.run.xml create mode 100644 .run/Code coverage.run.xml create mode 100644 .run/brute-coverage.run.xml create mode 100644 .run/build-and-use ToolsQualificationList.run.xml create mode 100644 .run/build-and-use acquire.run.xml create mode 100644 .run/build-and-use amplify-portal.run.xml create mode 100644 .run/build-and-use dasha.run.xml create mode 100644 .run/build-and-use petec-well-experience.run.xml create mode 100644 .run/build-and-use.run.xml create mode 100644 .run/build-storybook.run.xml create mode 100644 .run/build.run.xml create mode 100644 .run/lint.run.xml create mode 100644 .run/lint_fix.run.xml create mode 100644 .run/pretty.run.xml create mode 100644 .run/pretty_fix.run.xml create mode 100644 .run/setup.run.xml create mode 100644 .run/start.run.xml create mode 100644 .storybook/addons/GitHubSearchAddon/Panel.js create mode 100644 .storybook/addons/GitHubSearchAddon/constants.js create mode 100644 .storybook/addons/GitHubSearchAddon/manager.js create mode 100644 .storybook/amplifyTheme.js create mode 100644 .storybook/main.js create mode 100644 .storybook/manager.js create mode 100644 .storybook/preview-head.html create mode 100644 .storybook/preview.tsx create mode 100644 CONTRIBUTION.md create mode 100644 Dockerfile create mode 100644 LICENSE.md create mode 100644 SECURITY.md create mode 100644 docker-compose.yaml create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 proxy/nginx.conf create mode 100644 proxy/securityheaders.conf create mode 100644 radixconfig.yaml create mode 100644 rollup.config.mjs create mode 100644 secrets.sh create mode 100644 src/api/core/ApiError.ts create mode 100644 src/api/core/ApiRequestOptions.ts create mode 100644 src/api/core/ApiResult.ts create mode 100644 src/api/core/CancelablePromise.ts create mode 100644 src/api/core/OpenAPI.ts create mode 100644 src/api/core/request.ts create mode 100644 src/api/index.ts create mode 100644 src/api/models/AccessRole.ts create mode 100644 src/api/models/Applications.ts create mode 100644 src/api/models/CustomTutorialStep.ts create mode 100644 src/api/models/Feature.ts create mode 100644 src/api/models/FeatureToggleDto.ts create mode 100644 src/api/models/GenericTutorialStep.ts create mode 100644 src/api/models/GraphUser.ts create mode 100644 src/api/models/ReleaseNote.ts create mode 100644 src/api/models/ReleaseNotePatch.ts create mode 100644 src/api/models/ServiceNowIncidentAttachmentResponse.ts create mode 100644 src/api/models/ServiceNowIncidentResponse.ts create mode 100644 src/api/models/ServiceNowUrgency.ts create mode 100644 src/api/models/Tutorial.ts create mode 100644 src/api/models/TutorialPosition.ts create mode 100644 src/api/models/TutorialStepBase.ts create mode 100644 src/api/services/PortalService.ts create mode 100644 src/api/services/ReleaseNotesService.ts create mode 100644 src/api/services/TutorialService.ts create mode 100644 src/components/Feature.tsx create mode 100644 src/components/index.ts create mode 100644 src/components/mdx.d.ts create mode 100644 src/hooks/hooks.stories.tsx create mode 100644 src/hooks/index.ts create mode 100644 src/hooks/useFeatureToggling.test.tsx create mode 100644 src/hooks/useFeatureToggling.ts create mode 100644 src/hooks/useReleaseNotesQuery.ts create mode 100644 src/hooks/useSignalRMessages.ts create mode 100644 src/index.ts create mode 100644 src/intro.mdx create mode 100644 src/providers/AuthProvider/AuthProvider.tsx create mode 100644 src/providers/AuthProvider/AuthProviderInner.tsx create mode 100644 src/providers/FeatureToggleProvider.tsx create mode 100644 src/providers/ReleaseNotesProvider.test.tsx create mode 100644 src/providers/ReleaseNotesProvider.tsx create mode 100644 src/providers/TutorialProvider/TutorialDialog.tsx create mode 100644 src/providers/TutorialProvider/TutorialProvider.const.ts create mode 100644 src/providers/TutorialProvider/TutorialProvider.hooks.ts create mode 100644 src/providers/TutorialProvider/TutorialProvider.stories.tsx create mode 100644 src/providers/TutorialProvider/TutorialProvider.styles.ts create mode 100644 src/providers/TutorialProvider/TutorialProvider.test.tsx create mode 100644 src/providers/TutorialProvider/TutorialProvider.tsx create mode 100644 src/providers/TutorialProvider/TutorialProvider.types.ts create mode 100644 src/providers/TutorialProvider/TutorialProvider.utils.ts create mode 100644 src/providers/TutorialProvider/TutorialProviderInner.tsx create mode 100644 src/providers/TutorialProvider/TutorialStepIndicator.tsx create mode 100644 src/providers/TutorialStepsProvider.test.tsx create mode 100644 src/providers/TutorialStepsProvider.tsx create mode 100644 src/providers/index.ts create mode 100644 src/providers/providers.stories.tsx create mode 100644 src/storybook/InfoCard.tsx create mode 100644 src/storybook/Links.tsx create mode 100644 src/storybook/PropsTable.tsx create mode 100644 src/storybook/Stack.tsx create mode 100644 src/storybook/Story.tsx create mode 100644 src/storybook/index.ts create mode 100644 src/tests/browserMocks.ts create mode 100644 src/tests/setupTests.ts create mode 100644 src/tests/test-utils.ts create mode 100644 src/types/Environment.ts create mode 100644 src/types/Field.ts create mode 100644 src/types/Guidelines.ts create mode 100644 src/types/ReleaseNotes.ts create mode 100644 src/types/index.ts create mode 100644 src/utils/UtilStory.tsx create mode 100644 src/utils/auth.stories.tsx create mode 100644 src/utils/auth_environment.ts create mode 100644 src/utils/environment.stories.tsx create mode 100644 src/utils/index.ts create mode 100644 src/utils/localStorage.ts create mode 100644 src/utils/releaseNotes.test.ts create mode 100644 src/utils/releaseNotes.ts create mode 100644 src/vite-env.d.ts create mode 100644 static/Glitch_spritesheet.png create mode 100644 static/Questioning_spritesheet.png create mode 100644 static/amplify_logo.png create mode 100644 static/amplify_logotype_dark.png create mode 100644 tooling/brute-coverage.mjs create mode 100644 tooling/build-and-use.mjs create mode 100644 tooling/postinstall.js create mode 100644 tooling/taskrunner.mjs create mode 100644 tsconfig.build.json create mode 100644 tsconfig.json create mode 100644 vite.config.ts create mode 100644 vitest.config.ts diff --git a/.env b/.env new file mode 100644 index 0000000..a3578fe --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VITE_NAME="Amplify SAM" \ No newline at end of file diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..0873692 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,12 @@ +vite.config.ts +vitest.config.ts +playwright.config.ts + +src/api +src/config + +**/*.json +**/*.md +**/*.cjs +**/*.yaml +**/*.mjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..62ec144 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,84 @@ +module.exports = { + env: { + browser: true, + es6: true, + node: true, + }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended-type-checked', + 'plugin:@typescript-eslint/stylistic-type-checked', + 'plugin:react-hooks/recommended', + 'plugin:react/recommended', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + ecmaVersion: 12, + sourceType: 'module', + project: './tsconfig.json', + tsconfigRootDir: __dirname, + }, + plugins: ['react', 'react-hooks', '@typescript-eslint', 'simple-import-sort'], + rules: { + 'react/react-in-jsx-scope': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-floating-promises': 'off', // we don't always care about unhandled promises + '@typescript-eslint/prefer-nullish-coalescing': 'off', // we sometimes want to use || instead of ?? + '@typescript-eslint/no-misused-promises': [ + 'error', + { checksVoidReturn: false }, + ], + }, + overrides: [ + { + files: ['**/*.js', '**/*.ts', '**/*.tsx'], + rules: { + 'simple-import-sort/imports': [ + 'error', + { + groups: [ + // `react` first + ['^react?(.+)'], + // Packages starting with `@` + ['^@'], + // Packages starting with `~` + ['^~'], + // Imports starting with `./`, `../` `src` + [ + '^\\.\\.(?!/?$)', + '^\\.\\./?$', + '^\\./(?=.*/)(?!/?$)', + '^\\.(?!/?$)', + '^\\./?$', + 'src', + ], + // Imports starting with a character + ['^[a-z]'], + // Style imports + ['^.+\\.s?css$'], + // Side effect imports + ['^\\u0000'], + ], + }, + ], + }, + }, + { + files: ['**/*.js', '**/*.ts', '**/*.tsx'], + excludedFiles: ['*.test.*', '*.stories.*', './src/providers/AuthProvider/**', './src/utils/auth_environment.ts'], + rules: { + 'no-console': ['warn', { allow: ['warn', 'error'] }], + } + }, + ], + settings: { + react: { + pragma: 'React', + version: 'detect', + }, + }, +}; diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..ab51b8c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @equinor/amplify-frontend \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..8680c49 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,21 @@ +name: Build +on: + workflow_call: +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [21.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build diff --git a/.github/workflows/build_storybook.yaml b/.github/workflows/build_storybook.yaml new file mode 100644 index 0000000..09282c6 --- /dev/null +++ b/.github/workflows/build_storybook.yaml @@ -0,0 +1,21 @@ +name: Build storybook +on: + workflow_call: +jobs: + build-storybook: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [21.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build-storybook diff --git a/.github/workflows/code_coverage.yaml b/.github/workflows/code_coverage.yaml new file mode 100644 index 0000000..4d909f2 --- /dev/null +++ b/.github/workflows/code_coverage.yaml @@ -0,0 +1,21 @@ +name: Test +on: + workflow_call: +jobs: + code-coverage: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [21.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Unit tests + run: npm run test:coverage diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..09e9e1e --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,21 @@ +name: Lint +on: + workflow_call: +jobs: + lint: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [21.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Linting + run: npm run lint diff --git a/.github/workflows/npm_publish.yaml b/.github/workflows/npm_publish.yaml new file mode 100644 index 0000000..a1aeaa0 --- /dev/null +++ b/.github/workflows/npm_publish.yaml @@ -0,0 +1,27 @@ +name: NPM Publish +on: + workflow_call: + secrets: + npm-token: + required: true +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 21.x + + - name: Install dependencies + run: npm ci + + - name: Run Tests + run: npm run test:ci + + - name: Build Components + run: npm run build-components:ci + + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.npm-token }} diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml new file mode 100644 index 0000000..4da7a17 --- /dev/null +++ b/.github/workflows/pull_request.yaml @@ -0,0 +1,29 @@ +name: Pull request + +on: + pull_request: + branches: [main] + paths: + - "**" + - ".github/workflows/**" + workflow_dispatch: +jobs: + lint: + name: Lint + uses: ./.github/workflows/lint.yaml + + test: + name: Test + uses: ./.github/workflows/test.yaml + + code-coverage: + name: Code coverage + uses: ./.github/workflows/code_coverage.yaml + + build: + name: Build + uses: ./.github/workflows/build.yaml + + build-storybook: + name: Build storybook + uses: ./.github/workflows/build_storybook.yaml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..0204bf6 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,22 @@ +# This is a basic workflow to help you get started with Actions + +name: NPM Publish + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [main] + +jobs: + publish: + name: Publish to NPM + uses: ./.github/workflows/npm_publish.yaml + secrets: + npm-token: ${{ secrets.NPM_TOKEN }} + release: + name: Create release notes + needs: [publish] + uses: ./.github/workflows/release.yaml + secrets: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..f0dd2b2 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,33 @@ +name: Create release +on: + workflow_call: + secrets: + github-token: + required: true +jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + + - name: Install dependencies + run: npm ci + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.github-token }} + run: npx semantic-release diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..6b4dfbb --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,21 @@ +name: Test +on: + workflow_call: +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [21.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Unit tests + run: npm run test:ci diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae401fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +/dist +/lib + +# testing +/coverage + +# Webstorm user specific settings +.idea/workspace.xml + +# production +/build +/storybook-static + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# yarn modern +.yarn/* +!.yarn/patches +!.yarn/releases +!.yarn/plugins +!.yarn/sdks +!.yarn/versions +.pnp.* + diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..c37466e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged \ No newline at end of file diff --git a/.lintstagedrc.yaml b/.lintstagedrc.yaml new file mode 100644 index 0000000..0cae224 --- /dev/null +++ b/.lintstagedrc.yaml @@ -0,0 +1 @@ +"*.{js,mjs,tsx,ts,tsx,css}": ['eslint --fix', 'prettier --write'] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d2586c9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +# +node_modules +.yarn +.yarnrc.yml +.eslintrc.cjs diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..1ff74d1 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,19 @@ +module.exports = { + trailingComma: 'es5', + tabWidth: 2, + useTabs: false, + semi: true, + singleQuote: true, + jsxSingleQuote: false, + bracketSpacing: true, + bracketSameLine: false, + arrowParens: 'always', + overrides: [ + { + files: '**/*.hbs', + options: { + parser: 'html', + }, + }, + ], +}; diff --git a/.run/All Tests.run.xml b/.run/All Tests.run.xml new file mode 100644 index 0000000..495edf5 --- /dev/null +++ b/.run/All Tests.run.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.run/Code coverage.run.xml b/.run/Code coverage.run.xml new file mode 100644 index 0000000..0f1c188 --- /dev/null +++ b/.run/Code coverage.run.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.run/brute-coverage.run.xml b/.run/brute-coverage.run.xml new file mode 100644 index 0000000..cabf4d9 --- /dev/null +++ b/.run/brute-coverage.run.xml @@ -0,0 +1,12 @@ + + + + + +