Jens-G opened a new pull request, #3904:
URL: https://github.com/apache/thrift/pull/3904
Two jshint targets are configured below the language level of the code they
lint, so
`make -C lib/ts check` and `make -C lib/js check` fail on them.
**`jshint:test` — ES6 against ES8 source.** Prettier, which this repository
runs over these
files, writes trailing commas in argument lists:
```
Gruntfile.js
160 | },
^ 'Trailing comma in arguments lists' is only available in ES8
(use 'esversion: 8').
test/server_http.js
test/test_handler.js
>> 3 errors in 3 files
```
**`jshint:gen_node_code` — no `esversion` at all.** The target sets only
`node: true`, so jshint
assumes ES5 while the generated node code uses ES6 globals:
```
>> 423 errors in 3 files
366x 'Symbol' is not defined.
45x 'Promise' is not defined.
12x 'Set' is not defined.
```
`lib/js/Gruntfile.js` declares `gen_node_code` the same way and carries the
same defect; its
sibling target `gen_node_es6_code` already sets `esversion: 6`, which shows
the intent. Both
Gruntfiles are corrected here.
Verified: with these levels, all four jshint targets in lib/ts and all six
in lib/js report
"lint free", and both runs proceed past linting to their QUnit step.
These tests have not been running — `check-local` is guarded by `HAVE_NPM`,
which `configure.ac`
only sets inside the `--with-nodejs` blocks, so `make check` reports
"Nothing to be done" and
exits 0 in most configurations. THRIFT-6319 corrects that; this change is
one of its
prerequisites, together with THRIFT-6317, THRIFT-6318 and THRIFT-6322.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]