Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating github actions and adding prettier #2

Merged
merged 1 commit into from
Oct 22, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/lint-backend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Lint Backend
on:
pull_request:
push:
branches:
- main

jobs:
linting:
Expand All @@ -14,6 +17,6 @@ jobs:
uses: actions/setup-python@v2

- name: Lint
uses: chartboost/ruff-action@v1
uses: astral-sh/ruff-action@v1
CLeopard99 marked this conversation as resolved.
Show resolved Hide resolved
with:
src: ./backend
10 changes: 7 additions & 3 deletions .github/workflows/lint-frontend.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Lint Frontend

on:
on:
pull_request:
push:
branches:
- main

jobs:
linting:
Expand All @@ -23,4 +25,6 @@ jobs:
run: npm install

- name: Lint
run: npm run lint
run: |
npm run lint
npx prettier . --check
3 changes: 3 additions & 0 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Test Backend
on:
pull_request:
push:
branches:
- main

jobs:
testing:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/type-check-backend.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Type Check Backend
on:
on:
pull_request:
push:
branches:
- main

jobs:
checking:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ poetry.toml
# ruff
.ruff_cache/

# npm
node_modules/

# IDE stuff
.vscode
/.idea/material_theme_project_new.xml
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd frontend
npx lint-staged
76 changes: 35 additions & 41 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [".eslintrc.{js,cjs}"],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react", "@stylistic/js"],
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"@stylistic/js/eol-last": ["error", "always"]
},
"settings": {
"react": {
"version": "detect"
}
}
}
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [".eslintrc.{js,cjs}"],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react", "@stylistic/js"],
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": ["**/*.css"]
}
3 changes: 3 additions & 0 deletions frontend/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
1 change: 1 addition & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ UI service for interfacing with InferGPT.
1. Ensure the `.env` file has been configured as described in the main [README](../README.md).

This README covers instructions on how to run the application:

- Locally
- In a Docker Container

Expand Down
Loading
Loading