Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 0 additions & 76 deletions .eslintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
f8a107d276786cb76b22e43dbb1860f85d2a2289
f8a107d276786cb76b22e43dbb1860f85d2a2289
41d1a639de3c48829ab8a298ebe662274c09d115 # https://github.com/acm-uiuc/core/pull/135
53 changes: 2 additions & 51 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,55 +25,6 @@ jobs:
- name: Run unit testing
run: make test_unit

deploy-test-dev:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.event.repository.name }}-dev
cancel-in-progress: false
permissions:
id-token: write
contents: read
environment: "AWS DEV"
name: Deploy to DEV and Run Tests
needs:
- test-unit
steps:
- name: Set up Node for testing
uses: actions/setup-node@v4
with:
node-version: 22.x

- uses: actions/checkout@v4
env:
HUSKY: "0"
- uses: aws-actions/setup-sam@v2
with:
use-installer: true
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::427040638965:role/GitHubActionsRole
role-session-name: Core_Dev_Prod_Deployment_${{ github.run_id }}
aws-region: us-east-1
- name: Publish to AWS
run: make deploy_dev
env:
HUSKY: "0"
VITE_RUN_ENVIRONMENT: dev

- name: Run live testing
run: make test_live_integration
env:
JWT_KEY: ${{ secrets.JWT_KEY }}
- name: Run E2E testing
run: make test_e2e
env:
PLAYWRIGHT_USERNAME: ${{ secrets.PLAYWRIGHT_USERNAME }}
PLAYWRIGHT_PASSWORD: ${{ secrets.PLAYWRIGHT_PASSWORD }}

deploy-prod:
runs-on: ubuntu-latest
name: Deploy to Prod and Run Health Check
Expand All @@ -84,7 +35,7 @@ jobs:
id-token: write
contents: read
needs:
- deploy-test-dev
- test-unit
environment: "AWS PROD"
steps:
- name: Set up Node for testing
Expand All @@ -105,7 +56,7 @@ jobs:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::298118738376:role/GitHubActionsRole
role-session-name: Core_Dev_Prod_Deployment_${{ github.run_id }}
role-session-name: Core_Prod_Deployment_${{ github.run_id }}
aws-region: us-east-1
- name: Publish to AWS
run: make deploy_prod
Expand Down
8 changes: 0 additions & 8 deletions cloudformation/iam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ Resources:
Resource:
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-cache

- Sid: DynamoDBRateLimitTableAccess
Effect: Allow
Action:
- dynamodb:DescribeTable
- dynamodb:UpdateItem
Resource:
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-rate-limiter

- Sid: DynamoDBAuditLogTableAccess
Effect: Allow
Action:
Expand Down
24 changes: 0 additions & 24 deletions cloudformation/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,30 +408,6 @@ Resources:
- AttributeName: userEmail
KeyType: HASH

RateLimiterTable:
Type: "AWS::DynamoDB::Table"
DeletionPolicy: "Delete"
UpdateReplacePolicy: "Delete"
Properties:
BillingMode: "PAY_PER_REQUEST"
TableName: infra-core-api-rate-limiter
DeletionProtectionEnabled: true
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: false
AttributeDefinitions:
- AttributeName: PK
AttributeType: S
- AttributeName: SK
AttributeType: S
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
TimeToLiveSpecification:
AttributeName: ttl
Enabled: true

EventRecordsTable:
Type: "AWS::DynamoDB::Table"
DeletionPolicy: "Retain"
Expand Down
81 changes: 81 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { defineConfig, globalIgnores } from "eslint/config";
import _import from "eslint-plugin-import";
import prettier from "eslint-plugin-prettier";
import { fixupPluginRules } from "@eslint/compat";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import mantine from "eslint-config-mantine";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default defineConfig([
globalIgnores(["**/*.d.ts", "**/vite.config.ts"]),
{
extends: [
...compat.extends(
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
),
...mantine,
],

plugins: { import: fixupPluginRules(_import), prettier },

settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx", ".js", ".jsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: ["src/api/tsconfig.json", "src/ui/tsconfig.json"],
},
},
},

rules: {
"import/no-unresolved": "error",
"no-param-reassign": "off",
"import/extensions": [
"error",
"ignorePackages",
{ js: "never", jsx: "never", ts: "never", tsx: "never" },
],
"no-unused-vars": "off",
"max-classes-per-file": "off",
"func-names": "off",
"no-case-declarations": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],

"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
},
},
{
files: ["**/*.test.ts", "**/*.testdata.ts"],
rules: { "@typescript-eslint/no-explicit-any": "off" },
},
{
files: ["src/ui/*", "src/ui/**/*"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-console": ["error", { allow: ["warn", "error"] }],
},
},
]);
64 changes: 34 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
],
"packageManager": "[email protected]",
"scripts": {
"postinstall": "npm run setup",
"setup": "git config blame.ignoreRevsFile .git-blame-ignore-revs",
"build": "yarn workspaces run build && yarn lockfile-manage",
"dev": "concurrently --names 'api,ui' 'yarn workspace infra-core-api run dev' 'yarn workspace infra-core-ui run dev'",
"lockfile-manage": "synp --with-workspace --source-file yarn.lock && cp package-lock.json dist/lambda/ && cp package-lock.json dist/sqsConsumer/ && cp src/api/package.lambda.json dist/lambda/package.json && cp src/api/package.lambda.json dist/sqsConsumer/package.json && rm package-lock.json",
Expand All @@ -27,58 +29,60 @@
},
"dependencies": {},
"devDependencies": {
"@eslint/compat": "^1.1.1",
"@playwright/test": "^1.49.1",
"@tsconfig/node22": "^22.0.0",
"@types/node": "^22.1.0",
"@eslint/compat": "^1.2.8",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.25.1",
"@playwright/test": "^1.52.0",
"@tsconfig/node22": "^22.0.1",
"@types/ioredis-mock": "^8.2.5",
"@types/node": "^22.15.2",
"@types/pluralize": "^0.0.33",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/supertest": "^6.0.2",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@types/supertest": "^6.0.3",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-istanbul": "2.1.9",
"@vitest/ui": "^2.0.5",
"@vitest/coverage-istanbul": "3.1.2",
"@vitest/ui": "^3.1.2",
"aws-sdk-client-mock": "^4.1.0",
"concurrently": "^9.1.2",
"cross-env": "^7.0.3",
"esbuild": "^0.23.0",
"esbuild": "^0.25.3",
"esbuild-plugin-copy": "^2.1.1",
"eslint": "^8.57.0",
"eslint": "^9.25.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-esnext": "^4.1.0",
"eslint-config-mantine": "^3.2.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-config-mantine": "^4.0.3",
"eslint-config-prettier": "^10.1.2",
"eslint-import-resolver-typescript": "^4.3.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-prettier": "^5.2.6",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"husky": "^9.1.4",
"identity-obj-proxy": "^3.0.0",
"jsdom": "^24.1.1",
"ioredis-mock": "^8.9.0",
"jsdom": "^26.1.0",
"node-ical": "^0.20.1",
"postcss": "^8.4.41",
"postcss": "^8.5.3",
"postcss-preset-mantine": "^1.17.0",
"postcss-simple-vars": "^7.0.1",
"prettier": "^3.3.3",
"prettier": "^3.5.3",
"prop-types": "^15.8.1",
"request": "^2.88.2",
"storybook": "^8.2.8",
"storybook-dark-mode": "^4.0.2",
"stylelint": "^16.8.1",
"stylelint-config-standard-scss": "^13.1.0",
"supertest": "^7.0.0",
"stylelint": "^16.19.1",
"stylelint-config-standard-scss": "^14.0.0",
"supertest": "^7.1.0",
"synp": "^1.9.14",
"tsx": "^4.16.5",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.1",
"tsx": "^4.19.3",
"typescript": "^5.8.3",
"typescript-eslint": "^8.31.0",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.0.5",
"yarn-upgrade-all": "^0.7.4"
"vitest": "^3.1.2",
"yarn-upgrade-all": "^0.7.5"
},
"resolutions": {
"pdfjs-dist": "^4.8.69"
Expand Down
Loading
Loading