Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a lint workflow to fail on eslint warnings #7850

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion browser/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading