-
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 17950f2
Showing
45 changed files
with
11,202 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,83 @@ | ||
module.exports = { | ||
env: { | ||
es2022: true, | ||
node: true, | ||
}, | ||
extends: ["eslint:recommended"], | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint"], | ||
overrides: [ | ||
{ | ||
files: ["test/**/*"], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
], | ||
parserOptions: { | ||
project: ["./tsconfig.json"], | ||
}, | ||
ignorePatterns: [".eslintrc.js"], | ||
rules: { | ||
// https://stackoverflow.com/questions/57802057/eslint-configuring-no-unused-vars-for-typescript | ||
// Use typescript's checker for unused vars (critical for Enums) | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": ["error"], | ||
// https://typescript-eslint.io/rules/no-use-before-define | ||
"no-use-before-define": "off", | ||
"@typescript-eslint/no-use-before-define": "error", | ||
|
||
// https://typescript-eslint.io/rules/ban-ts-comment | ||
// Disallow @ts-<directive> comments or require descriptions after directives. | ||
"@typescript-eslint/ban-ts-comment": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-explicit-any | ||
// Disallow the any type. | ||
//"@typescript-eslint/no-explicit-any": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-unsafe-assignment | ||
// Disallow assigning a value with type any to variables and properties. | ||
"@typescript-eslint/no-unsafe-assignment": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-unsafe-return | ||
// Disallow returning a value with type any from a function. | ||
"@typescript-eslint/no-unsafe-return": "error", | ||
|
||
// https://typescript-eslint.io/rules/ban-types | ||
// Disallow certain types. | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
types: { | ||
unknown: "That is not allowed in this course.", | ||
any: "That is not allowed in this course.", | ||
}, | ||
}, | ||
], | ||
// https://typescript-eslint.io/rules/no-array-constructor | ||
// Disallow generic Array constructors. | ||
"no-array-constructor": "off", | ||
"@typescript-eslint/no-array-constructor": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-base-to-string | ||
// Require .toString() to only be called on objects which provide useful information when stringified. | ||
"@typescript-eslint/no-base-to-string": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-confusing-void-expression | ||
// Require expressions of type void to appear in statement position. | ||
"@typescript-eslint/no-confusing-void-expression": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-for-in-array | ||
// Disallow iterating over an array with a for-in loop. (Force for-of instead!) | ||
"@typescript-eslint/no-for-in-array": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare | ||
// Disallow unnecessary equality comparisons against boolean literals. | ||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", | ||
|
||
// https://typescript-eslint.io/rules/no-unnecessary-condition | ||
// Disallow conditionals where the type is always truthy or always falsy. | ||
"@typescript-eslint/no-unnecessary-condition": "error", | ||
}, | ||
}; |
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,51 @@ | ||
# .gitattributes snippet to force users to use same line endings for project. | ||
# | ||
# Handle line endings automatically for files detected as text | ||
# and leave all files detected as binary untouched. | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files NOT found below | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes | ||
|
||
|
||
|
||
# These files are text and should be normalized (Convert crlf => lf) | ||
*.php text | ||
*.css text | ||
*.js text | ||
*.json text | ||
*.htm text | ||
*.html text | ||
*.xml text | ||
*.txt text | ||
*.ini text | ||
*.inc text | ||
*.pl text | ||
*.rb text | ||
*.py text | ||
*.scm text | ||
*.sql text | ||
.htaccess text | ||
*.sh text | ||
*.svg text | ||
|
||
# These files are binary and should be left untouched | ||
# (binary is a macro for -text -diff) | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.mov binary | ||
*.mp4 binary | ||
*.mp3 binary | ||
*.flv binary | ||
*.fla binary | ||
*.swf binary | ||
*.gz binary | ||
*.zip binary | ||
*.7z binary | ||
*.ttf binary | ||
*.pyc binary |
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,78 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy dev build on main push | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: [main] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
|
||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- id: get-repo-values | ||
run: | | ||
url=https://$(echo "${{github.repository}}" | sed "s/\//.github.io\//") | ||
echo "url=$url" >> $GITHUB_OUTPUT | ||
- name: Update package.json homepage | ||
uses: jossef/action-set-json-field@v1 | ||
with: | ||
file: package.json | ||
field: homepage | ||
value: ${{ steps.get-repo-values.outputs.url }} | ||
- name: Install | ||
run: | | ||
npm install | ||
# TODO: Set up linter | ||
- run: npm run lint | ||
- name: Build | ||
run: | | ||
npm run build | ||
- name: Create GitInspector Report | ||
run: | | ||
git clone https://github.com/jpwhite3/gitinspector.git | ||
python ./gitinspector/gitinspector.py ./src/ --grading --format=html -f tsx,ts,html,css -x ./gitinspector > ./dist/report.html | ||
- name: Copy over index.md to docs/ | ||
run: | | ||
cp README.md docs/index.md | ||
- name: Generate HTML from Markdown for docs | ||
uses: ldeluigi/markdown-docs@latest | ||
with: | ||
src: docs | ||
dst: dist/docs/ | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
# Upload entire repository | ||
path: "dist/" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@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,2 @@ | ||
node_modules | ||
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,4 @@ | ||
{ | ||
"experimentalTernaries": true, | ||
"tabWidth": 4 | ||
} |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
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,25 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:8080", | ||
"webRoot": "${workspaceFolder}", | ||
"sourceMaps": true, | ||
"sourceMapPathOverrides": { | ||
"meteor://💻app/*": "${workspaceFolder}/*", | ||
"webpack:///./~/*": "${workspaceFolder}/node_modules/*", | ||
"webpack://?:*/*": "${workspaceFolder}/*" | ||
}, | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.(m|c|)js", | ||
"!**/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,8 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnPaste": true | ||
} |
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,3 @@ | ||
{ | ||
"test":"true" | ||
} |
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 @@ | ||
# Habit-tracker Application |
Empty file.
Empty file.
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 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
Oops, something went wrong.