mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-11 11:13:12 +08:00
Merge
This commit is contained in:
+36
-9
@@ -1,7 +1,32 @@
|
||||
exclude: "build|stubs|^bot/templates/|openassistant/templates"
|
||||
# WARNING!
|
||||
#
|
||||
# When making changes to auto-formatters used in pre-commit hooks, you are
|
||||
# likely to cause merge conflicts with main and/or other pull requests.
|
||||
# Fixing them might revert other people's work. Expect pain!
|
||||
# To avoid accidental reversions and keep it easy to review, please make sure
|
||||
# that changes here are in a pull request by themselves, that it consists of
|
||||
# two commits:
|
||||
#
|
||||
# 1. The changes to this file
|
||||
# 2. Changes made by running `python3 -m pre_commit run --all-files`.
|
||||
#
|
||||
# Then each time your pull request is blocked by a merge conflict, do the
|
||||
# following steps:
|
||||
#
|
||||
# git reset HEAD^1 && git checkout -f # discard the change commit
|
||||
# git rebase main # re-apply other people's changes
|
||||
# python3 -m pre_commit run --all-files # re-run the rules
|
||||
# git add . # add the newly changed files
|
||||
# git commit -m 'apply pre-commit' # commit it
|
||||
# git push -f # force push back to your branch
|
||||
#
|
||||
# Keep in mind you may have to do this a few times, as changes here may impact
|
||||
# other pull requests. Try to keep it up-to-date so they can go in when it'll
|
||||
# cause least disruption.
|
||||
#
|
||||
# /WARNING!
|
||||
|
||||
default_language_version:
|
||||
python: python3
|
||||
exclude: "build|stubs|^bot/templates/|openassistant/templates/$"
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
@@ -14,11 +39,12 @@ repos:
|
||||
# and which break the standard YAML check. The alternative would be to
|
||||
# skip any unsafe errors (and thus break YAML compatibility) or use
|
||||
# some other checker that may not work in general.
|
||||
exclude: "^copilot/web/addons/.*$"
|
||||
exclude: ^copilot/.*/addons/.*$
|
||||
- id: check-json
|
||||
- id: check-case-conflict
|
||||
- id: detect-private-key
|
||||
- id: fix-encoding-pragma
|
||||
args: [--remove]
|
||||
- id: forbid-submodules
|
||||
- id: mixed-line-ending
|
||||
- id: requirements-txt-fixer
|
||||
@@ -28,13 +54,13 @@ repos:
|
||||
- id: check-symlinks
|
||||
- id: check-merge-conflict
|
||||
- id: check-added-large-files
|
||||
args: ["--maxkb=1024"]
|
||||
args: [--maxkb=1024]
|
||||
- id: end-of-file-fixer
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.12.0
|
||||
hooks:
|
||||
- id: black
|
||||
- id: black-jupyter
|
||||
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: 6.0.0
|
||||
@@ -50,14 +76,15 @@ repos:
|
||||
rev: v2.7.1
|
||||
hooks:
|
||||
- id: prettier
|
||||
args: ["--write"]
|
||||
args: [--prose-wrap=always, --write]
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: next-lint-website
|
||||
name: Lint website
|
||||
files: ^website/
|
||||
exclude: ^website/node_modules/
|
||||
types_or: [javascript, jsx, ts, tsx]
|
||||
language: system
|
||||
language: node
|
||||
pass_filenames: false
|
||||
entry: bash -c 'cd website && npm ci && npm run lint'
|
||||
entry: website/next-lint.js
|
||||
|
||||
Reference in New Issue
Block a user