Skip to content

test: switch to flat config mode in code path analysis tests #19824

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

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

mdjermanovic
Copy link
Member

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)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

Updates code path analysis tests to use Linter in flat config mode instead of eslintrc mode. We'd need to do this sooner or later since the eslintrc mode will be removed in ESLint v10.

What changes did you make? (Give an overview)

Updated code-path.js and code-path-analyzer.js tests.

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

@mdjermanovic mdjermanovic requested a review from a team as a code owner June 5, 2025 19:11
@eslint-github-bot eslint-github-bot bot added the chore This change is not user-facing label Jun 5, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Jun 5, 2025
Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit a4b2627
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/6841ebcdaf3f73000884d685
"foo(); function foo() {} var foo = function() {}; var foo = () => {};",
{ rules: { test: 2 }, env: { es6: true } },
"foo(); function bar() {} var baz = function() {}; var qux = () => {};",
Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed variables to avoid a parsing error: a function declaration and a variable cannot have the same name in ES modules.

@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jun 6, 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

@snitin315 snitin315 merged commit 152ed51 into main Jun 6, 2025
30 checks passed
@snitin315 snitin315 deleted the codepath-tests-flat branch June 6, 2025 17:21
@github-project-automation github-project-automation bot moved this from Needs Triage to Complete in Triage Jun 6, 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 chore This change is not user-facing
3 participants