generated from StanfordBDHG/NextJSTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6a7658c
Showing
47 changed files
with
12,357 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
.git | ||
.next | ||
.results | ||
scripts | ||
*Dockerfile* | ||
.dockerignore | ||
npm-debug.log | ||
README.md | ||
LICENSE.md | ||
LICENSES | ||
node_modules | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"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", | ||
"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)", "**/*.stories.ts?(x)"], | ||
"rules": { | ||
"import/no-default-export": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
|
||
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
|
||
SPDX-License-Identifier: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
name: Build and Test | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
reuseaction: | ||
name: REUSE Compliance Check | ||
uses: StanfordBDHG/.github/.github/workflows/reuse.yml@v2 | ||
markdownlinkcheck: | ||
name: Markdown Link Check | ||
uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2 | ||
eslint: | ||
name: ESLint | ||
uses: StanfordBDHG/.github/.github/workflows/eslint.yml@v2 | ||
permissions: | ||
contents: read | ||
checks: write | ||
testandcoverage: | ||
name: Test and Coverage | ||
uses: StanfordBDHG/.github/.github/workflows/npm-test-and-coverage.yml@v2 | ||
secrets: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
dockercomposetest: | ||
name: Docker Compose & Test | ||
uses: StanfordBDHG/.github/.github/workflows/docker-compose-test.yml@v2 | ||
with: | ||
dockerComposeFile: docker-compose-development.yml | ||
testscript: test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
name: CodeQL | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 8 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: 'ubuntu-latest' | ||
permissions: | ||
security-events: write | ||
packages: read | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
name: Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
buildandtest: | ||
name: Build and Test | ||
uses: ./.github/workflows/build-and-test.yml | ||
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 | ||
environment: package | ||
permissions: | ||
contents: read | ||
packages: write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
name: Monthly Markdown Link Check | ||
|
||
on: | ||
schedule: | ||
- cron: '0 8 1 * *' | ||
|
||
jobs: | ||
markdown_link_check: | ||
name: Markdown Link Check | ||
uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# lint | ||
eslint_report.json | ||
|
||
# docs | ||
docs | ||
|
||
# editors | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
**/dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
// | ||
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
|
||
const config = { | ||
plugins: [require.resolve('prettier-plugin-tailwindcss')], | ||
semi: false, | ||
singleQuote: true, | ||
experimentalTernaries: true, | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project | ||
# | ||
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
cff-version: 1.2.0 | ||
message: 'If you use this software, please cite it as below.' | ||
authors: | ||
- family-names: 'Schmiedmayer' | ||
given-names: 'Paul' | ||
orcid: 'https://orcid.org/0000-0002-8607-9148' | ||
- 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' |
Oops, something went wrong.