You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: replace deprecated rules in processor tests - #767
I used AI to write or edit the description of this PR (including translation).
I used AI to understand the codebase.
I used AI to write or edit the files in this PR and I reviewed the files.
What is the purpose of this pull request?
In this PR, I replaced deprecated rules in the processor tests with non-deprecated alternatives.
Those deprecated rules are scheduled for removal (like the references below), so if they are removed in the future the tests may no longer behave as expected.
No actionable comments were generated in the recent review.
Walkthrough
The changes update test fixtures and expectations for ESLint rules, Markdown directive parsing, plugin linting and autofixing, and processor postprocessing. No production code changes are described.
Changes: Lint test updates
Layer / File(s)
Summary
Rule fixtures and directive parsing tests/fixtures/eslint.config.js, tests/fixtures/eslintrc.json, tests/fixtures/long.md, tests/language/markdown-source-code.test.js
Fixtures use dot-notation and Yoda examples. Markdown directive expectations change from semi to yoda.
Plugin lint and autofix expectations tests/plugin.test.js
LegacyESLint and FlatESLint cases replace quote and semicolon examples with Yoda conditions, dot-notation, and unused-label cases. Leading-empty-lines expectations change to no-restricted-syntax.
This PR replaces deprecated rules in test fixtures and expectations with non-deprecated ones and does not change shipped behavior. Merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the change: replacing deprecated ESLint rules in the processor tests. The raw summary confirms processor.test.js swaps quotes and other deprecated-rule cases for Yoda, eqeqeq, and no-a…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the change: replacing deprecated ESLint rules in the processor tests. The raw summary confirms processor.test.js swaps quotes and other deprecated-rule cases for Yoda, eqeqeq, and no-alert cases. The title is specific and matches the main change. It omits the fixture and plugin test updates, which is acceptable.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Central YAML; Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID: 7e75b7c6-3869-4a36-9408-466ec3f9277a
Commits
Reviewing files that changed from the base of the PR and between e3ce918 and 5e8f529.
Files selected for processing: 6
tests/fixtures/eslint.config.js
tests/fixtures/eslintrc.json
tests/fixtures/long.md
tests/language/markdown-source-code.test.js
tests/plugin.test.js
tests/processor.test.js
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
single / double are leftovers from the quotes version of this test. Maybe literalFirst / literalLast?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites checklist
AI acknowledgment
Check all that apply.
What is the purpose of this pull request?
In this PR, I replaced deprecated rules in the processor tests with non-deprecated alternatives.
Those deprecated rules are scheduled for removal (like the references below), so if they are removed in the future the tests may no longer behave as expected.
https://github.com/eslint/eslint/blob/eafd727a060131f7fc79b2eb5698d8d27683c3a2/lib/rules/quotes.js#L104
I've tried to preserve the original intent of the test code and minimize the git diff.
What changes did you make? (Give an overview)
In this PR, I replaced deprecated rules in the processor tests with non-deprecated alternatives.
Related Issues
eslint/eslint#20406
Is there anything you'd like reviewers to focus on?
N/A
Summary by CodeRabbit