Merge branch 'main' of github.com:CPSC319-Winter-term-2/Alley-HSBC-Frontend into main
This commit is contained in:
commit
1eef65d60e
1
.env.example
Normal file
1
.env.example
Normal file
@ -0,0 +1 @@
|
|||||||
|
ENV=
|
||||||
54
.eslintrc.json
Normal file
54
.eslintrc.json
Normal 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
10
.husky/pre-commit
Normal 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
|
||||||
Reference in New Issue
Block a user