From 88799d459e2729227602dd7286130bffceb3edb4 Mon Sep 17 00:00:00 2001 From: Nils Reichardt Date: Mon, 7 Aug 2023 22:41:35 +0200 Subject: [PATCH] Add Prettier to "format" check (#86) --- .github/workflows/ci.yml | 8 +++++++- .prettierignore | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .prettierignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67ad1ecb..a6a14d63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,9 +49,15 @@ jobs: with: sdk: beta - - name: Format + - name: Install Prettier + run: npm install --global prettier@3.0.1 + + - name: Format (Dart) run: dart format --set-exit-if-changed $(find lib -name "*.dart" -not \( -name "*.*freezed.dart" -o -name "*.*g.dart" \) ) + - name: Format (Prettier) + run: prettier . --check + test: # We need to use macOS because of the golden tests, see # https://github.com/flutter/flutter/issues/36667#issuecomment-521335243. diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..5db8815c --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +macos/Pods/** +macos/Runner/** +build/**