Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pre commit/eslint ruff versions (#3957)
Browse files Browse the repository at this point in the history
* Add eslint pre-commit and ruff, typos

* Add husky
wssheldon authored and metroid-samus committed Nov 29, 2023
1 parent e41e818 commit 5115a56
Showing 3 changed files with 48 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -13,17 +13,24 @@ default_language_version:
python: python3.11.2

repos:
# Black
- repo: https://github.com/psf/black
rev: 23.1.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.4
hooks:
- id: black
# Run the linter.
#
# When running with --fix, Ruff's lint hook should be placed before Ruff's formatter hook,
# and before Black, isort, and other formatting tools, as Ruff's fix behavior can output code changes that require reformatting.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format

# Ruff
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.259"
# Typos
- repo: https://github.com/crate-ci/typos
rev: v1.16.23
hooks:
- id: ruff
- id: typos

# Pytest
- repo: local
16 changes: 16 additions & 0 deletions src/dispatch/static/dispatch/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions src/dispatch/static/dispatch/package.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,22 @@
"name": "dispatch",
"version": "0.1.0",
"private": true,
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"prettier --write",
"eslint --fix",
"git add"
],
"*.{html,css,less,ejs}": [
"prettier --write",
"git add"
]
},
"scripts": {
"serve": "cross-env NODE_ENV=dev NODE_OPTIONS='--max-http-header-size=100000' vite",
"build": "vite build --out-dir dist",
@@ -53,6 +69,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.7.0",
"eslint-plugin-vuetify": "^2.0.5",
"husky": "^8.0.3",
"jquery": "^3.6.0",
"jwt-decode": "^3.1.2",
"prettier": "^2.7.1",

0 comments on commit 5115a56

Please sign in to comment.