From 504dc479936263c51b6ccdfe17ff14539050b190 Mon Sep 17 00:00:00 2001 From: Bastien Abadie <bastien@nextcairn.com> Date: Tue, 8 Jun 2021 11:26:08 +0200 Subject: [PATCH] Base pre-commit config --- .pre-commit-config.yaml | 37 +++++++++++++++++++++++++++++++++++++ tools/build_utf8_scripts.py | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..c3c35950 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,37 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-eslint + rev: v7.25.0 + hooks: + - id: eslint + language: node + args: ['--fix', '--max-warnings', '0'] + files: \.(js|vue)$ + types: [file] + additional_dependencies: + - eslint@7.25.0 + - eslint-plugin-vue@7.9.0 + - eslint-config-prettier@8.3.0 + - eslint-plugin-prettier@3.4.0 + - eslint-plugin-import@2.22.1 + - eslint-import-resolver-webpack@0.13.0 + - babel-eslint@10.1.0 + - prettier@2.2.1 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-symlinks + - id: trailing-whitespace + - id: check-yaml + - id: mixed-line-ending + - id: check-json + - repo: https://github.com/codespell-project/codespell + rev: v1.17.1 + hooks: + - id: codespell + args: ['--write-changes'] + exclude: (^assets/|^package-lock.json$) + - repo: meta + hooks: + - id: check-useless-excludes diff --git a/tools/build_utf8_scripts.py b/tools/build_utf8_scripts.py index 117aa09d..8e8de470 100644 --- a/tools/build_utf8_scripts.py +++ b/tools/build_utf8_scripts.py @@ -27,7 +27,7 @@ def int2hex(value): # Convert to uppercase by convention value = value.upper() - # Pad to 4 digits mininum + # Pad to 4 digits minimum return value.zfill(4) -- GitLab