-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from UTDNebula/formatting-check
Formatting check
- Loading branch information
Showing
17 changed files
with
111 additions
and
71 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,14 @@ | ||
if [ $status == 0 ]; then | ||
echo "## Formatting Check passed 🥳" >>$GITHUB_STEP_SUMMARY | ||
echo "All files are formatted correctly" >>$GITHUB_STEP_SUMMARY | ||
exit 0 | ||
else | ||
echo "## Formatting Check Failed 😅" >>$GITHUB_STEP_SUMMARY | ||
echo "Please run prettier using \`npx prettier . --write\` in order to format your code" >>$GITHUB_STEP_SUMMARY | ||
echo "### Files with bad formatting:" >>$GITHUB_STEP_SUMMARY | ||
for file in $files; do | ||
echo "- $file" >>$GITHUB_STEP_SUMMARY | ||
echo "::error file=$file::$file not formatted correctly" | ||
done | ||
exit 1 | ||
fi |
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,24 @@ | ||
name: Formatting Check | ||
run-name: Running formatting check | ||
on: [push] | ||
jobs: | ||
check-formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
- name: Run npm install | ||
run: | | ||
mv package.json package.json.bak | ||
npm i --no-save prettier prettier-plugin-tailwindcss | ||
mv package.json.bak package.json | ||
- name: Run prettier | ||
run: | | ||
files=`npx prettier . -l` || st=$? && st=$? | ||
echo status=`echo $st`>>"$GITHUB_ENV" | ||
echo files=`echo $files`>> "$GITHUB_ENV" | ||
- name: generate errors/summary | ||
run: .github/workflows/generateCheck.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 @@ | ||
src/server/db/migrations/* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
|
@@ -126,4 +126,3 @@ const Form = () => { | |
}; | ||
|
||
export default Form; | ||
|
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 |
---|---|---|
|
@@ -43,4 +43,3 @@ const FormPopUp: React.FC<formPopUpProps> = ({ onClose, isOpen }) => { | |
}; | ||
|
||
export default FormPopUp; | ||
|
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { sql } from "drizzle-orm"; | ||
import { pgTable, text, timestamp, integer } from "drizzle-orm/pg-core" | ||
import { sql } from 'drizzle-orm'; | ||
import { pgTable, text, timestamp, integer } from 'drizzle-orm/pg-core'; | ||
|
||
export const forms = pgTable("feedback_form", { | ||
id: text("id") | ||
.default(sql`nanoid(20)`) | ||
.primaryKey(), | ||
rating: integer('rating').notNull(), | ||
likes: text('likes').default(''), | ||
dislikes: text('dislikes').default(''), | ||
features: text('features').default(''), | ||
submit_on: timestamp('submit_on', { withTimezone: true }).notNull(), | ||
}) | ||
export const forms = pgTable('feedback_form', { | ||
id: text('id') | ||
.default(sql`nanoid(20)`) | ||
.primaryKey(), | ||
rating: integer('rating').notNull(), | ||
likes: text('likes').default(''), | ||
dislikes: text('dislikes').default(''), | ||
features: text('features').default(''), | ||
submit_on: timestamp('submit_on', { withTimezone: true }).notNull(), | ||
}); |
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