dongjoon-hyun opened a new pull request, #59607:
URL: https://github.com/apache/spark/pull/59607

   ### What changes were proposed in this pull request?
   
   This PR is a follow-up of #59569 for `branch-4.0`. It sets `ecmaVersion` to 
`latest` in the `parserOptions` of `dev/eslint.js`.
   
   ```diff
      "parserOptions": {
   -    "sourceType": "module"
   +    "sourceType": "module",
   +    "ecmaVersion": "latest"
      }
   ```
   
   This is the same setting that `master`, `branch-4.1`, and `branch-4.x` 
already have. It was added by SPARK-51629 (#50427), which first shipped in 
[v4.1.0](https://github.com/apache/spark/releases/tag/v4.1.0) (2025-12-11) and 
was not backported to `branch-4.0`.
   
   ### Why are the changes needed?
   
   To fix the `branch-4.0` CI. #59569 added `ui-test/tests/log-view.test.js`, 
which uses `import.meta.url` (ES2020 syntax). Without `ecmaVersion`, ESLint 
7.32 in `branch-4.0` fails to parse it, so the `JS linter` step fails.
   
   - https://github.com/apache/spark/actions/runs/39147434474/job/117734406330
   
   ```
   /__w/spark/spark/ui-test/tests/log-view.test.js
     28:41  error  Parsing error: Unexpected token import
   
   ✖ 1 problem (1 error, 0 warnings)
   
   lint-js checks failed.
   ```
   
   The test itself works because Jest runs in ESM mode (`node 
--experimental-vm-modules`). Only the linter config is behind.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. This is a dev-only linter configuration change.
   
   ### How was this patch tested?
   
   Pass the CIs. I also ran the following manually on `branch-4.0`.
   
   ```
   $ ./dev/lint-js
   lint-js checks passed.
   ```
   
   ```
   $ cd ui-test && TZ=UTC node --experimental-vm-modules node_modules/.bin/jest
   PASS tests/log-view.test.js
   PASS tests/utils.test.js
   PASS tests/structured-streaming-page.test.js
   PASS tests/flamegraph.test.js
   PASS tests/executorspage.test.js
   Tests:       15 passed, 15 total
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.5


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to