File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ This repository contains JOSA's custom pre-commit hooks.
55## Available Hooks
66
77- [ Validate Flux] ( #validate-flux ) - A script to validate Flux custom resources and Kustomize overlays.
8+ - [ Validate Eslint] ( #validate-eslint ) - A script to validate eslint rules on Javascript and Typescript files.
89
910___
1011
@@ -41,3 +42,39 @@ pre-commit install -t pre-push
4142```
4243
4344___
45+
46+ ## validate-eslint
47+
48+ This script runs eslint rule checks on staged files that have the following extensions:
49+
50+ - ts
51+ - tsx
52+ - vue
53+ - js
54+ - jsx
55+
56+ ### Prerequisites
57+
58+ You need the following to be installed on your machine before running this pre-commit script.
59+
60+ - [ ESLINT v8.11] ( https://www.npmjs.com/package/eslint )
61+
62+ ### Usage
63+
64+ Add this to your .pre-commit-config.yaml:
65+
66+ ``` yaml
67+ - repo : https://github.com/jordanopensource/pre-commit-hooks
68+ rev : v0.1.0 # Use the ref you want to point at
69+ hooks :
70+ - id : validate-eslint
71+ # - id: ...
72+ ```
73+
74+ After the configuration is added, you'll need to run
75+
76+ ``` bash
77+ pre-commit install -t pre-commit
78+ ```
79+
80+ ___
You can’t perform that action at this time.
0 commit comments