ktroutner / football-data-manager

Application to manage results and stats of football games
MIT License
0 stars 0 forks source link

Automatically run formatters and linters on commit #19

Closed ktroutner closed 2 years ago

ktroutner commented 2 years ago

Summary

Fixes #18

(base) kyletroutner@KylenoMacBook-Air football-data-manager % git diff
diff --git a/app/controllers/competitions/statistics_controller.rb b/app/controllers/competitions/statistics_controller.rb
index 933ad0b..d35521c 100644
--- a/app/controllers/competitions/statistics_controller.rb
+++ b/app/controllers/competitions/statistics_controller.rb
@@ -9,7 +9,6 @@ module Competitions

       first_stage = @competition.stages.first
       return unless first_stage.is_a?(LeagueStage) && first_stage.groups.count == 1
-
       league_statistics(first_stage)
     end

diff --git a/app/javascript/components/TeamStatisticsGraph.tsx b/app/javascript/components/TeamStatisticsGraph.tsx
index d416f3a..5b7697b 100644
--- a/app/javascript/components/TeamStatisticsGraph.tsx
+++ b/app/javascript/components/TeamStatisticsGraph.tsx
@@ -14,7 +14,7 @@ type DataPoint = {
 type TeamStatistics = {
   team: Team
   data: DataPoint[]
-}
+};

 type Props = {
   statistics: TeamStatistics[]
(base) kyletroutner@KylenoMacBook-Air football-data-manager % git add -A
(base) kyletroutner@KylenoMacBook-Air football-data-manager % git commit -m "test"
yarn run v1.22.17
$ /Users/kyletroutner/git/football-data-manager/node_modules/.bin/lint-staged
✔ Preparing...
✔ Running tasks...
✖ Prevented an empty git commit!
✔ Reverting to original state because of errors...
✔ Cleaning up...

  ⚠ lint-staged prevented an empty git commit.
  Use the --allow-empty option to continue, or check your task configuration

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 1 (error)
(base) kyletroutner@KylenoMacBook-Air football-data-manager %

Additional changes