Update linting workflows for frontend and Python code (#2171)

* chore: Update pre-commit hooks and dependencies

* chore: Add linting workflow for frontend code

* chore: Update linting workflow for Python code and include tests in pull requests

* chore: Add Ruff style check workflow for Python code
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-14 06:27:48 -07:00 • committed by GitHub
commit a9cb7b0f5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 115 additions and 36 deletions

View file

@ -1,18 +1,5 @@
fail_fast: true
repos:
- repo: https://github.com/pre-commit/mirrors-eslint
rev: "v9.1.1"
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
args: ["--fix", "--no-warn-ignored"]
additional_dependencies:
- eslint@9.1.1
- eslint-plugin-prettier
- eslint-config-prettier
- prettier
- eslint-plugin-react@latest
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
@ -25,16 +12,3 @@ repos:
args:
- --fix=lf
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.2
hooks:
# Run the linter.
- id: ruff
# Python
files: \.py$
types: [file]
# Run the formatter.
- id: ruff-format
files: \.py$
types: [file]