From fa50bbad9c669e884b84363abc69ebc941b715ab Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 17 Oct 2023 23:23:33 -0700 Subject: [PATCH] Add pre-commit with prettier --- .pre-commit-config.yaml | 19 +++++++++++++++++++ .prettierrc | 1 + requirements.txt | 1 + 3 files changed, 21 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierrc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..6cc46b478 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + exclude: "(^mkdocs\\.yml$)" + - id: check-added-large-files +- repo: https://github.com/pre-commit/mirrors-prettier + rev: 'v3.0.3' + hooks: + - id: prettier + types_or: + - javascript + - markdown + - jsx diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/requirements.txt b/requirements.txt index a86e7a805..b55fe427d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,3 +26,4 @@ requests==2.31.0 six==1.16.0 urllib3==2.0.5 watchdog==3.0.0 +pre-commit==3.5.0