Skip to content

Commit

Permalink
306 reset with modern dependencies (#315)
Browse files Browse the repository at this point in the history
* Reset with new project and updated gitignore

* Updated workflows and dependencies

* Installed MUI, config prettier

* Use prettier instead of IDE

* Installed Storybook

* Setup storybook, create themes

* Updated README

* Add public static folder

* current assets push

* Fixed PNPM CLI

* Artifact metas up to sophomore spring

* Optimized PDF, added junior fall assets

* Updated favicon, removed templates

* Reformat and Lint

* DeepSource fixes

---------

Co-authored-by: kjy5 <[email protected]>
  • Loading branch information
kjy5 and kjy5 authored Jan 16, 2024
1 parent eeb0a3c commit c8b45fd
Show file tree
Hide file tree
Showing 101 changed files with 11,582 additions and 10,898 deletions.
2 changes: 0 additions & 2 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ version = 1

[[analyzers]]
name = "secrets"
enabled = false

[[analyzers]]
name = "javascript"
enabled = true

[analyzers.meta]
plugins = ["react"]
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
.prettierrc.cjs
.eslintrc.js
env.d.ts
vite.config.ts
38 changes: 22 additions & 16 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:react-hooks/recommended",
"prettier",
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:jsx-a11y/recommended',
'eslint-config-prettier',
'plugin:storybook/recommended',
],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
ecmaVersion: "latest",
sourceType: "module",
settings: {
react: { version: 'detect' },
},
plugins: ["@typescript-eslint", "react-refresh"],
root: true,
ignorePatterns: ["dist", "vite.config.ts", "src/components/Gallery.jsx"],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
"sort-imports": "error",
"react-refresh/only-export-components": "warn",
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
};
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Bug Report
description: Create a report to help us improve
title: "[BUG]: "
labels: ["bug"]
title: '[BUG]: '
labels: ['bug']
body:
- type: textarea
id: what-happened
Expand Down Expand Up @@ -30,7 +30,7 @@ body:
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: "It was supposed to do this..."
placeholder: 'It was supposed to do this...'
validations:
required: false

Expand All @@ -39,7 +39,7 @@ body:
attributes:
label: Desktop Information
description: Explain what environment you encountered the problem in
placeholder: "OS: Windows 10, Browser: Chrome, Version: 90.0.4430.212"
placeholder: 'OS: Windows 10, Browser: Chrome, Version: 90.0.4430.212'
validations:
required: false

Expand All @@ -48,9 +48,9 @@ body:
attributes:
label: Do you plan to solve this issue yourself?
options:
- "Yes"
- "No"
- "I need help"
- 'Yes'
- 'No'
- 'I need help'
validations:
required: true

Expand Down
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Feature Request
description: Suggest an idea for this project
title: "[FEATURE]: "
labels: ["feature"]
title: '[FEATURE]: '
labels: ['feature']
body:
- type: textarea
id: related-problem
Expand All @@ -17,7 +17,7 @@ body:
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
placeholder: "It would be nice if..."
placeholder: 'It would be nice if...'
validations:
required: true

Expand All @@ -26,9 +26,9 @@ body:
attributes:
label: Do you plan to solve this issue yourself?
options:
- "Yes"
- "No"
- "I need help"
- 'Yes'
- 'No'
- 'I need help'
validations:
required: true

Expand Down
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

version: 2
updates:
- package-ecosystem: "npm"
directory: "/" # Location of package manifests
- package-ecosystem: 'npm'
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
- package-ecosystem: 'github-actions'
directory: '.github/workflows'
schedule:
interval: 'weekly'
8 changes: 1 addition & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
**Addressed Issues**

- Fixes #

**Brief summary of changes**

- Changes 1....

**Notes**
- **Notes**
31 changes: 19 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_call:
inputs:
upload-artifact:
description: "Upload artifact to be used by other workflows"
description: 'Upload artifact to be used by other workflows'
required: true
default: false
type: boolean
Expand All @@ -24,22 +24,29 @@ jobs:
- name: πŸ›Ž Checkout
uses: actions/checkout@v4

# Configure NPM to cache dependencies
- name: πŸ“¦ Setup Node.js and caching
uses: actions/setup-node@v3
# Setup PNPM
- name: 🟨 Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest

# Configure Node and caching
- name: 🟩 Setup Node.js and caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache: 'pnpm'

# Install dependencies
- name: πŸ“¦ Install
run: pnpm install

# Install deps and build
- name: πŸ”¨ Install and Build
run: |
npm i
npm run build
- name: πŸ”¨ Build
run: pnpm build

# Upload artifact if requested
- name: ⬆️ Upload artifact
if: ${{ inputs.upload-artifact }}
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: "dist"
path: 'dist'
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: "Dependency Review"
name: 'Dependency Review'
on: [pull_request]

permissions:
Expand All @@ -14,7 +14,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: "Dependency Review"
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:

# Allow one concurrent deployment
concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: true

jobs:
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/reformat-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,39 @@ on:
jobs:
reformat-and-lint:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
permissions:
contents: write

steps:
- name: πŸ›Ž Checkout
if: github.event.pull_request.user.login != 'dependabot[bot]'
uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOW_COMMIT }}

- name: πŸ€–πŸ›Ž Bot Checkout
if: github.event.pull_request.user.login == 'dependabot[bot]'
uses: actions/checkout@v4
# Setup PNPM
- name: 🟨 Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest

- name: πŸ“¦ Setup Node.js and caching
uses: actions/setup-node@v3
- name: 🟩 Setup Node.js and caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache: 'pnpm'

- name: πŸ”¨ Install
run: npm i
# Install dependencies
- name: πŸ“¦ Install
run: pnpm install

- name: 🧹 Reformat
run: npx prettier --write .
run: pnpm prettier

- name: 🚨 Lint
run: npx eslint .
run: pnpm lint

- name: ⬆️ Commit changes
if: github.event.pull_request.user.login != 'dependabot[bot]'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Reformat and Lint
Loading

0 comments on commit c8b45fd

Please sign in to comment.