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

test: apply eslint to .js files as well #19538

Merged
merged 1 commit into from
Oct 27, 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
8 changes: 4 additions & 4 deletions test/static-code
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ set -eu
# note: `set -e` is not active during the tests.

find_scripts() {
# Helper to find all Python files in the tree
# Helper to find all scripts in the tree
(
# Any non-binary file which contains a python3 shebang
# Any non-binary file which contains a given shebang
git grep --cached -lIz '^#!.*'"$1"
# Any file ending in '.py'
# Any file ending in the provided regex
git ls-files -z "$2"
) | sort -z | uniq -z
}
Expand Down Expand Up @@ -69,7 +69,7 @@ test_js_translatable_strings() {
if [ "${WITH_PARTIAL_TREE:-0}" = 0 ]; then
test_eslint() {
test -x node_modules/.bin/eslint -a -x /usr/bin/node || skip 'no eslint'
find_scripts 'node' '*.js?' | xargs -0 node_modules/.bin/eslint
find_scripts 'node' '*.js' '*.js?' | xargs -0 node_modules/.bin/eslint
}
fi

Expand Down
6 changes: 3 additions & 3 deletions tools/webpack-make.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
echo "This got renamed to ./build.js. Please see HACKING.md"
exit 1
#!/bin/env node
console.error("This got renamed to ./build.js. Please see HACKING.md");
process.exit(1);
Comment on lines +1 to +3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be in favor of just dropping this. It's been long enough now, this was only meant to adjust our muscle memory.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but someone suggested switching it over. Let's drop it in March then :)