Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sethamus
Copy link
Contributor

@sethamus sethamus commented Apr 19, 2025

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

#19564 modified the no-unused-expressions rule to use the node.directive property for detecting directives. This change introduced a compatibility issue with ES3 codebases, as the directive property does not exist on nodes in ES3 ASTs.

Closes #19637

Is there anything you'd like reviewers to focus on?

@sethamus sethamus requested a review from a team as a code owner April 19, 2025 01:00
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Apr 19, 2025
@eslint-github-bot
Copy link

Hi @sethamus!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.

  • The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?

To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.

Read more about contributing to ESLint here

@github-actions github-actions bot added the rule Relates to ESLint's core rules label Apr 19, 2025
@netlify
Copy link

netlify bot commented Apr 19, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit e3337d1
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/68039ae36f972e000888be27

@eslint-github-bot
Copy link

Hi @sethamus!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.

  • The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?

To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.

Read more about contributing to ESLint here

@sethamus sethamus changed the title revert: use node.directive for directive check fix: revert directive detection in no-unused-expressions Apr 19, 2025
@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Apr 19, 2025
@snitin315
Copy link
Contributor

@sethamus Lint is failing, can you please check?

Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

@sethamus can you please add a test case as well?

@snitin315 snitin315 moved this from Needs Triage to Implementing in Triage Apr 19, 2025
@snitin315 snitin315 added the accepted There is consensus among the team that this change meets the criteria for inclusion label Apr 19, 2025
@snitin315 snitin315 added the patch candidate This issue may necessitate a patch release in the next few days label Apr 19, 2025
@snitin315
Copy link
Contributor

Accepting & marking this as a patch candidate since we officially support ECMAScript 3.

// @mdjermanovic @JoshuaKGoldberg @SwetaTanwar

@mdjermanovic mdjermanovic added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed accepted There is consensus among the team that this change meets the criteria for inclusion labels Apr 19, 2025
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM if we decide to revert the directive detection in this rule.

@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Apr 21, 2025
@mdjermanovic mdjermanovic moved this from Implementing to Merge Candidates in Triage Apr 21, 2025
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@snitin315
Copy link
Contributor

snitin315 commented Apr 21, 2025

Merging as this is now accepted.

@snitin315 snitin315 merged commit cdc8e8c into eslint:main Apr 21, 2025
30 of 31 checks passed
@github-project-automation github-project-automation bot moved this from Merge Candidates to Complete in Triage Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly contributor pool patch candidate This issue may necessitate a patch release in the next few days rule Relates to ESLint's core rules

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

no-unused-expressions started to trigger on 'use strict' in 9.25.0

3 participants