-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added and applied ESLint and Prettier (#429)
* Added and applied ESLint and Prettier * Added and applied ESLint and Prettier to BE * switch ci/cd to npm * Add pre-commit hooks and linting CI * Rename lint step to lint --------- Co-authored-by: Franco Reyes <[email protected]>
- Loading branch information
1 parent
cf957d7
commit 5fcd73e
Showing
73 changed files
with
14,722 additions
and
11,010 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,2 @@ | ||
#!/bin/sh | ||
git update-index -g |
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,16 @@ | ||
#!/bin/sh | ||
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') | ||
[ -z "$FILES" ] && exit 0 | ||
|
||
# Prettify all frontend files | ||
FE_FILES=$(echo "$FILES" | grep "^frontend/.*\.[tj]sx\?$") | ||
echo "$FE_FILES" | xargs frontend/node_modules/.bin/prettier --config frontend/.prettierrc --ignore-unknown --write | ||
|
||
# Prettify all backend files | ||
BE_FILES=$(echo "$FILES" | grep "^backend/.*\.[tj]sx\?$") | ||
echo "$BE_FILES" | xargs backend/node_modules/.bin/prettier --config backend/.prettierrc --ignore-unknown --write | ||
|
||
# Add back the modified/prettified files to staging | ||
echo "$FILES" | xargs git add | ||
|
||
exit 0 |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"env": { | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint", "simple-import-sort"], | ||
"rules": { | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
dist/ | ||
|
||
# Non PNPM lockfiles | ||
package-lock.json | ||
yarn.lock | ||
pnpm-lock.yaml |
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,7 +1,7 @@ | ||
{ | ||
"ignore": ["database.json"], | ||
"execMap": { | ||
"ts": "ts-node -r tsconfig-paths/register", | ||
"js": "node -r ts-node/register/transpile-only -r tsconfig-paths/register" | ||
} | ||
} | ||
"ignore": ["database.json"], | ||
"execMap": { | ||
"ts": "ts-node -r tsconfig-paths/register", | ||
"js": "node -r ts-node/register/transpile-only -r tsconfig-paths/register" | ||
} | ||
} |
Oops, something went wrong.