diff --git a/Makefile.am b/Makefile.am index 7d48b91a0..ff42180cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -630,6 +630,14 @@ compile_commands: $(abs_srcdir)/compile_commands.json browser/node_modules: browser/package.json browser/archived-packages @cd browser && npm install +eslint: browser/node_modules + browser/node_modules/.bin/eslint browser/src browser/js browser/admin/src \ + --max-warnings 0 \ + --resolve-plugins-relative-to browser \ + --ignore-path browser/.eslintignore \ + --no-eslintrc \ + --config browser/.eslintrc + install-exec-hook: cd $(DESTDIR)$(bindir) && \ $(LN_S) coolconfig loolconfig && \ @@ -671,7 +679,7 @@ check-for-system-nss: fi \ fi -check: check-for-system-nss check-recursive +check: check-for-system-nss check-recursive eslint $(GEN_COVERAGE_COMMAND) coverage-report: diff --git a/browser/.eslintrc b/browser/.eslintrc index fcaf8bb0f..f3e275b85 100644 --- a/browser/.eslintrc +++ b/browser/.eslintrc @@ -20,7 +20,11 @@ "no-control-regex": 0, "no-useless-escape": 0, "semi": 2, - "no-redeclare": 0 + "no-redeclare": 0, + /// Rules that are set to warn will fail in CI but not when building for development: + "no-debugger": 1, + "no-unreachable": 1, + "no-unused-vars": 1, }, "globals": { "L": true,