Skip to content
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
24 changes: 24 additions & 0 deletions .husky/_/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env sh
set -e

exists() { [ -e "$1" ]; }

echo "[pre-commit] lint-staged"
npx --no-install lint-staged

# Preventing prettier errors
npm run format

if exists apps/frontend/package.json; then
echo "[pre-commit] frontend"
npm run -s precommit:frontend || exit 1
else
echo "[pre-commit] skip frontend (missing)"
fi

if exists apps/backend/composer.json; then
echo "[pre-commit] backend"
npm run -s precommit:backend || exit 1
else
echo "[pre-commit] skip backend (missing)"
fi
2 changes: 2 additions & 0 deletions .husky/_/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh

3 changes: 3 additions & 0 deletions apps/backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
"test": [
"@php artisan config:clear --ansi",
"@php artisan test"
],
"precommit": [
"@php artisan config:clear --ansi"
]
},
"extra": {
Expand Down
124 changes: 85 additions & 39 deletions apps/backend/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 12 additions & 16 deletions apps/frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
// eslint.config.js
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';

export default tseslint.config(
{ ignores: ['dist'] },
export default [
{ ignores: ['dist', 'node_modules'] },
...tseslint.configs.recommended,
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
ecmaVersion: 'latest',
sourceType: 'module',
globals: { window: 'readonly', document: 'readonly' },
},
plugins: { react: pluginReact },
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
},
},
);
];
Loading
Loading