diff --git a/.dockerignore b/.dockerignore index 6492e7b9..cf09adce 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # diff --git a/.eslintrc.json b/.eslintrc.json index 360245e4..9568e048 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,8 +1,112 @@ { - "extends": ["next/core-web-vitals", "prettier"], - "plugins": ["prettier"], - "ignorePatterns": ["**/dist/*.js", "/docs/**", "/out/**"], + "plugins": ["prettier", "@typescript-eslint", "import"], + "parserOptions": { + "project": "./tsconfig.json" + }, + "parser": "@typescript-eslint/parser", + "extends": [ + "plugin:@typescript-eslint/strict-type-checked", + "plugin:@typescript-eslint/stylistic-type-checked", + "plugin:import/recommended", + "plugin:import/typescript", + "next/core-web-vitals", + "prettier" + ], + "ignorePatterns": [ + "**/dist/*", + "/docs/**", + "/out/**", + "**/jest.config.js", + "**/next.config.js", + "**/postcss.config.js", + "**/tailwind.config.js" + ], "rules": { - "prettier/prettier": "error" - } + "prettier/prettier": "error", + "import/order": [ + "warn", + { + "groups": ["builtin", "external", "internal", ["parent", "sibling"]], + "pathGroupsExcludedImportTypes": ["builtin"], + "newlines-between": "never", + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } + } + ], + "import/no-empty-named-blocks": "error", + "import/no-mutable-exports": "error", + "import/no-cycle": "error", + "import/extensions": [ + "warn", + "always", + { + "ts": "never", + "tsx": "never", + "js": "never", + "jsx": "never", + "mjs": "never" + } + ], + "import/newline-after-import": "warn", + "import/no-anonymous-default-export": "warn", + "import/no-default-export": "error", + "@typescript-eslint/consistent-type-imports": [ + "warn", + { + "prefer": "type-imports", + "fixStyle": "inline-type-imports", + "disallowTypeAnnotations": false + } + ], + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksVoidReturn": { + "attributes": false + } + } + ], + "import/no-duplicates": [ + "error", + { + "prefer-inline": true + } + ], + // false negatives + "import/namespace": ["off"], + "no-empty-pattern": "off", + // make sure to `await` inside try…catch + "@typescript-eslint/return-await": ["error", "in-try-catch"], + "@typescript-eslint/no-confusing-void-expression": [ + "error", + { "ignoreArrowShorthand": true } + ], + // empty interfaces are fine, e.g. React component that extends other component, but with no additional props + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/array-type": [ + "warn", + { "default": "array-simple", "readonly": "array-simple" } + ], + // allow unused vars prefixed with `_` + "@typescript-eslint/no-unused-vars": [ + "error", + { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } + ], + // numbers and booleans are fine in template strings + "@typescript-eslint/restrict-template-expressions": [ + "error", + { "allowNumber": true, "allowBoolean": true } + ], + "react/no-unescaped-entities": "off" + }, + "overrides": [ + { + "files": ["app/**/*.ts?(x)"], + "rules": { + "import/no-default-export": "off" + } + } + ] } diff --git a/.eslintrc.json.license b/.eslintrc.json.license index dc192b8f..b42956e4 100644 --- a/.eslintrc.json.license +++ b/.eslintrc.json.license @@ -1,5 +1,5 @@ -This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b9be6bee..25bced06 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b65f48a6..4ffcd0e1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # @@ -28,11 +28,11 @@ jobs: actions: read contents: read steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: javascript-typescript - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: Checkout repository + uses: actions/checkout@v4 + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript-typescript + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55611233..19ce7d8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # @@ -21,19 +21,11 @@ jobs: permissions: contents: read checks: write - nextjsgithubpages: - name: Deploy Next.js site to GitHub Pages - needs: buildandtest - uses: StanfordBDHG/.github/.github/workflows/nextjs-github-pages.yml@v2 - permissions: - contents: read - pages: write - id-token: write dockerimage: name: Docker Build and Push uses: StanfordBDHG/.github/.github/workflows/docker-build-and-push.yml@v2 with: - imageName: stanfordbdhg/nextjstemplate + imageName: stanfordbdhg/engagehfwebfrontend environment: package permissions: contents: read diff --git a/.github/workflows/monthly-markdown-link-check.yml b/.github/workflows/monthly-markdown-link-check.yml index f2379e91..cdc704e6 100644 --- a/.github/workflows/monthly-markdown-link-check.yml +++ b/.github/workflows/monthly-markdown-link-check.yml @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # @@ -10,7 +10,7 @@ name: Monthly Markdown Link Check on: schedule: - - cron: "0 8 1 * *" + - cron: '0 8 1 * *' jobs: markdown_link_check: diff --git a/.gitignore b/.gitignore index 5ab1665c..4c60f504 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..1b5fad5c --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +# +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project +# +# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) +# +# SPDX-License-Identifier: MIT +# + +**/dist +node_modules diff --git a/.prettierrc.cjs b/.prettierrc.cjs index 95aa3f1c..3440dccb 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -1,5 +1,5 @@ // -// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project // // SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) // diff --git a/CITATION.cff b/CITATION.cff index 13cecdf4..91f02c99 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # @@ -15,6 +15,7 @@ authors: - family-names: 'Ravi' given-names: 'Vishnu' orcid: 'https://orcid.org/0000-0003-0359-1275' -title: 'NextJSTemplate' -doi: '10.5281/zenodo.10052055' -url: 'https://github.com/StanfordBDHG/NextJSTemplate' + - family-names: 'Arkadiusz' + given-names: 'Bachorski' +title: 'ENGAGE-HF Web Frontend' +url: 'https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend' diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 9ed8f51e..7ca9bfeb 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,6 +1,6 @@ -# Stanford Biodesign Digital Health Next.js Template Contributors +# Stanford Biodesign Digital Health ENGAGE-HF open-source project - [Paul Schmiedmayer](https://github.com/PSchmiedmayer) - [Vishnu Ravi](https://github.com/vishnuravi) diff --git a/Dockerfile b/Dockerfile index 0eb4dc74..49d0c9dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # Based on the docker file found at https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile. # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) diff --git a/README.md b/README.md index 323c1f7a..8634a32d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Biodesign Digital Health Next.js Template +# Stanford Biodesign Digital Health ENGAGE-HF Web Frontend -[![Build and Test](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/build-and-test.yml) -[![Deployment](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/main.yml/badge.svg)](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/main.yml) -[![codecov](https://codecov.io/gh/StanfordBDHG/NextJSTemplate/graph/badge.svg?token=dfQW5eZ2up)](https://codecov.io/gh/StanfordBDHG/NextJSTemplate) -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10052055.svg)](https://doi.org/10.5281/zenodo.10052055) +[![Build and Test](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/build-and-test.yml) +[![Deployment](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/main.yml/badge.svg)](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/main.yml) +[![codecov](https://codecov.io/gh/StanfordBDHG/ENGAGE-HF-Web-Frontend/graph/badge.svg?token=PsKyNz7Woe)](https://codecov.io/gh/StanfordBDHG/ENGAGE-HF-Web-Frontend) -## How To Use This Template +## How To Use ENGAGE-HF Web Frontend -The template repository contains a template for a Next.js project providing automated GitHub Actions and setups for code linting, testing & test coverage reports, docker deployments, a docker compose setup, local packages for modular deployment, and documentation generation & deployment. - -Follow these steps to customize it to your needs: - -1. Rename the Next.js project. -2. Modify, add, or remove the local packages found at `/packages/*` to separate code into smaller modules. -3. Add dependencies and edit the project in `/app` and the local Node packages. - -The main application is automatically deployed to https://stanfordbdhg.github.io/NextJSTemplate/. - -The documentation of the local packages is automatically deployed to https://stanfordbdhg.github.io/NextJSTemplate/docs. +The ENGAGE-HF Web Frontend repository contains a Next.js project providing automated GitHub Actions and setups for code linting, testing & test coverage reports, docker deployments, a docker compose setup, local packages for modular deployment. ## Getting Started @@ -73,12 +62,12 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next ## License -This project is licensed under the MIT License. See [Licenses](https://github.com/StanfordBDHG/NextJSTemplate/tree/main/LICENSES) for more information. +This project is licensed under the MIT License. See [Licenses](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/tree/main/LICENSES) for more information. ## Contributors This project is developed as part of the Stanford Byers Center for Biodesign at Stanford University. -See [CONTRIBUTORS.md](https://github.com/StanfordBDHG/NextJSTemplate/tree/main/CONTRIBUTORS.md) for a full list of all Next.js Template contributors. +See [CONTRIBUTORS.md](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/tree/main/CONTRIBUTORS.md) for a full list of all contributors. ![Stanford Byers Center for Biodesign Logo](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-light.png#gh-light-mode-only) ![Stanford Byers Center for Biodesign Logo](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-dark.png#gh-dark-mode-only) diff --git a/app/favicon.ico.license b/app/favicon.ico.license index dc192b8f..b42956e4 100644 --- a/app/favicon.ico.license +++ b/app/favicon.ico.license @@ -1,5 +1,5 @@ -This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) diff --git a/app/globals.css b/app/globals.css index d5a05891..6a942e75 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,6 +1,6 @@ /* -This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) diff --git a/app/layout.tsx b/app/layout.tsx index 4045408c..94c49e70 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,5 @@ // -// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project // // SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) // @@ -11,8 +11,8 @@ import type { ReactNode } from 'react' import './globals.css' export const metadata: Metadata = { - title: 'Next.js Template', - description: 'Stanford Biodesign Digital Health Next.js Template', + title: 'ENGAGE-HF Web Frontend', + description: 'Stanford Biodesign Digital Health ENGAGE-HF Web Frontend', } interface RootLayoutProps { diff --git a/app/page.test.tsx b/app/page.test.tsx index df14aeec..23dee619 100644 --- a/app/page.test.tsx +++ b/app/page.test.tsx @@ -1,5 +1,5 @@ // -// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project // // SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) // @@ -11,11 +11,11 @@ import '@testing-library/jest-dom' import Home from './page' describe('Home Component', () => { - it('renders the Stanford Biodesign Digital Health Next.js Template heading', () => { + it('renders the Stanford Biodesign Digital Health ENGAGE-HF Web Frontend heading', () => { render() const headingElement = screen.getByText( - /Welcome to the Stanford Biodesign Digital Health Next.js Template/i, + /Welcome to the Stanford Biodesign Digital Health ENGAGE-HF Web Frontend/i, ) expect(headingElement).toBeInTheDocument() @@ -24,9 +24,9 @@ describe('Home Component', () => { it('renders the Stanford Biodesign Logo', () => { render() - const imageElement = screen.getByAltText( + const imageElement: HTMLImageElement = screen.getByAltText( 'Stanford Biodesign Logo', - ) as HTMLImageElement + ) expect(imageElement).toBeInTheDocument() expect(imageElement.src).toContain('stanfordbiodesign.png') diff --git a/app/page.tsx b/app/page.tsx index 1696fe88..607205fe 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,5 +1,5 @@ // -// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project // // SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) // @@ -16,7 +16,7 @@ export default function Home() {
Stanford Biodesign Logo=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/parser": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", - "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.11.0.tgz", + "integrity": "sha512-yimw99teuaXVWsBcPO1Ais02kwJ1jmNA1KxE7ng0aT7ndr1pT1wqj0OJnsYVGKKlc4QJai86l/025L6z8CljOg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "7.2.0", - "@typescript-eslint/types": "7.2.0", - "@typescript-eslint/typescript-estree": "7.2.0", - "@typescript-eslint/visitor-keys": "7.2.0", + "@typescript-eslint/scope-manager": "7.11.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/typescript-estree": "7.11.0", + "@typescript-eslint/visitor-keys": "7.11.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2573,31 +2608,56 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", - "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.11.0.tgz", + "integrity": "sha512-27tGdVEiutD4POirLZX4YzT180vevUURJl4wJGmm6TrQoiYwuxTIY98PBp6L2oN+JQxzE0URvYlzJaBHIekXAw==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.2.0", - "@typescript-eslint/visitor-keys": "7.2.0" + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/visitor-keys": "7.11.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.11.0.tgz", + "integrity": "sha512-WmppUEgYy+y1NTseNMJ6mCFxt03/7jTOy08bcg7bxJJdsM4nuhnchyBbE8vryveaJUf62noH7LodPSo5Z0WUCg==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "7.11.0", + "@typescript-eslint/utils": "7.11.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/types": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", - "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.11.0.tgz", + "integrity": "sha512-MPEsDRZTyCiXkD4vd3zywDCifi7tatc4K37KqTprCvaXptP7Xlpdw0NR2hRJTetG5TxbWDB79Ys4kLmHliEo/w==", "dev": true, - "license": "MIT", "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2605,23 +2665,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", - "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.11.0.tgz", + "integrity": "sha512-cxkhZ2C/iyi3/6U9EPc5y+a6csqHItndvN/CzbNXTNrsC3/ASoYQZEt9uMaEp+xFNjasqQyszp5TumAVKKvJeQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "7.2.0", - "@typescript-eslint/visitor-keys": "7.2.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/visitor-keys": "7.11.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2638,17 +2697,15 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2659,18 +2716,39 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@typescript-eslint/utils": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.11.0.tgz", + "integrity": "sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.11.0", + "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/typescript-estree": "7.11.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", - "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.11.0.tgz", + "integrity": "sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.2.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "7.11.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -2916,7 +2994,6 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -4138,7 +4215,6 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -4552,6 +4628,133 @@ } } }, + "node_modules/eslint-config-next/node_modules/@typescript-eslint/parser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", + "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-config-next/node_modules/@typescript-eslint/scope-manager": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-config-next/node_modules/@typescript-eslint/types": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-config-next/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-config-next/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.2.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-config-next/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-config-next/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/eslint-config-prettier": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", @@ -4646,7 +4849,6 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, - "license": "MIT", "dependencies": { "array-includes": "^3.1.7", "array.prototype.findlastindex": "^1.2.3", @@ -5491,7 +5693,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -8534,7 +8735,6 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } diff --git a/package-lock.json.license b/package-lock.json.license index dc192b8f..b42956e4 100644 --- a/package-lock.json.license +++ b/package-lock.json.license @@ -1,5 +1,5 @@ -This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) diff --git a/package.json b/package.json index 5b96044b..a82e3049 100644 --- a/package.json +++ b/package.json @@ -1,25 +1,26 @@ { - "name": "nextjstemplate", + "name": "engagehfwebfrontend", "version": "0.1.0", "license": "MIT", - "description": "Stanford Biodesign Digital Health Next.js Template", + "description": "Stanford Biodesign Digital Health ENGAGE-HF Web Frontend", "keywords": [ "Stanford", "Biodesign" ], "repository": { "type": "git", - "url": "https://github.com/StanfordBDHG/NextJSTemplate" + "url": "https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend" }, "private": true, "scripts": { "dev": "concurrently \"next dev\" \"npm --prefix packages/example-package run watch\"", "prebuild": "npm --prefix packages/example-package run build", + "buildTypes": "npm --prefix packages/example-package run buildTypes", "build": "next build", "start": "next start", "lint": "eslint .", "lint:fix": "eslint . --fix & prettier --write .", - "lint:ci": "eslint --output-file eslint_report.json --format json .", + "lint:ci": "npm run buildTypes && eslint --output-file eslint_report.json --format json .", "pretest": "npm --prefix packages/example-package run build", "test": "jest", "docs": "typedoc", @@ -40,11 +41,14 @@ "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", + "@typescript-eslint/eslint-plugin": "^7", + "@typescript-eslint/parser": "^7", "autoprefixer": "^10", "concurrently": "^8", "eslint": "^8", "eslint-config-next": "^14", "eslint-config-prettier": "^9", + "eslint-plugin-import": "^2", "eslint-plugin-prettier": "^5", "jest": "^29", "jest-environment-jsdom": "^29", diff --git a/package.json.license b/package.json.license index dc192b8f..b42956e4 100644 --- a/package.json.license +++ b/package.json.license @@ -1,5 +1,5 @@ -This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) diff --git a/packages/example-package/.gitignore b/packages/example-package/.gitignore index b23dada1..cda2bbf4 100644 --- a/packages/example-package/.gitignore +++ b/packages/example-package/.gitignore @@ -1,5 +1,5 @@ # -# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project +# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project # # SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) # diff --git a/packages/example-package/README.md b/packages/example-package/README.md index bd58f617..bb27e486 100644 --- a/packages/example-package/README.md +++ b/packages/example-package/README.md @@ -1,6 +1,6 @@