Merge branch 'main' of github.com:CPSC319-Winter-term-2/Alley-HSBC-Frontend into main

This commit is contained in:
Taehee Choi 2022-02-20 12:43:14 -08:00
commit 1eef65d60e
5 changed files with 68 additions and 1 deletions

1
.env.example Normal file
View File

@ -0,0 +1 @@
ENV=

54
.eslintrc.json Normal file
View File

@ -0,0 +1,54 @@
{
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"files": ["*.ts", "*.tsx"]
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"sort-imports": [
0,
{
"ignoreCase": true,
"allowSeparatedGroups": true,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}
],
"@typescript-eslint/no-explicit-any": ["warn"],
"@typescript-eslint/no-inferrable-types": [0],
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"linebreak-style": ["warn", "unix"],
"quotes": ["error", "double", { "avoidEscape": true }],
"semi": ["error", "always"]
}
}

10
.husky/pre-commit Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
if [[ "$STAGED_FILES" = "" ]]; then
echo "No files staged for commit"
exit 1
fi
echo "Valiidating Typescript..."
npm run lint -- --max-warnings 0

2
.npmrc Normal file
View File

@ -0,0 +1,2 @@
engine-strict=true
omit=peer