Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add frontend linter to lefthook

Oliver Günther45cf983e2645
diff --git a/lefthook.yml b/lefthook.yml
index 2ab02177022..b316fa6aab6 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -8,6 +8,11 @@
pre-commit:
parallel: true
commands:
+ eslint:
+ root: "frontend/"
+ files: git diff --name-only --staged
+ glob: "*.{js,ts,jsx,tsx}"
+ run: npx eslint {staged_files}
rubocop:
files: git diff --name-only --staged
glob: "*.rb"