Skip to content

[#3077] Covered '.mjs' and '.cjs' by the '.editorconfig' line-length rule and removed the redundant 'eslint.config.mjs' section. - #3083

Merged
AlexSkrypnyk merged 2 commits into
mainfrom
feature/editorconfig-mjs
Sep 3, 2026
Merged

[#3077] Covered '.mjs' and '.cjs' by the '.editorconfig' line-length rule and removed the redundant 'eslint.config.mjs' section.#3083
AlexSkrypnyk merged 2 commits into
mainfrom
feature/editorconfig-mjs

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Sep 3, 2026

Copy link
Copy Markdown
Member

Closes #3077

Summary

The [eslint.config.mjs] section in .editorconfig became a no-op after the 1.41.0 rename from [.eslintrc.json], because its indent_size = 2 is already inherited from [*] and .mjs matches no more specific glob than [*] itself. At the same time, .mjs and .cjs files fell outside the max_line_length = 160 rule that mirrors Prettier's printWidth, since they matched neither [*.js] nor [*.{json,lock}]. This PR widens the JavaScript glob to [*.{js,mjs,cjs}] so the line-length rule applies uniformly, and removes the now-redundant [eslint.config.mjs] section.

Changes

  • Widened the [*.js] section in root .editorconfig to [*.{js,mjs,cjs}] so max_line_length = 160 also applies to .mjs and .cjs files.
  • Removed the redundant [eslint.config.mjs] section from root .editorconfig, since its indent_size = 2 was already inherited from [*].
  • Regenerated the installer baseline fixture at .vortex/installer/tests/Fixtures/handler_process/_baseline/.editorconfig via the snapshots tooling to match the updated root file.
  • Confirmed no theme-level .editorconfig exists under web/, so the root file is the only one affected by this change.

Before / After

┌─ BEFORE ────────────────────────────────────────────────────┐
│ # Matches the Prettier 'printWidth' in .prettierrc.json.     │
│ [*.js]                                                        │
│ max_line_length = 160                                         │
│                                                                │
│ [eslint.config.mjs]      <- no max_line_length reaches here;  │
│ indent_size = 2             .mjs matches neither glob above,  │
│                              and indent_size just repeats [*] │
└────────────────────────────────────────────────────────────────┘

┌─ AFTER ─────────────────────────────────────────────────────┐
│ # Matches the Prettier 'printWidth' in .prettierrc.json.     │
│ [*.{js,mjs,cjs}]                                              │
│ max_line_length = 160    <- now also covers .mjs and .cjs     │
│                                                                │
│ (the [eslint.config.mjs] section is gone; nothing depended    │
│  on it once [*.{js,mjs,cjs}] and [*] cover the same ground)   │
└────────────────────────────────────────────────────────────────┘

Summary by CodeRabbit

  • Chores
    • Updated editor settings to consistently cover JavaScript, module, and CommonJS files.
    • Removed the dedicated editor settings section for the ESLint configuration file.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 026eb3d5-5b8e-42de-ab0b-c5e5f1b8d168

📥 Commits

Reviewing files that changed from the base of the PR and between 07d8658 and 20c8652.

⛔ Files ignored due to path filters (1)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/.editorconfig is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (1)
  • .editorconfig

Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


Walkthrough

The .editorconfig JavaScript pattern now covers .js, .mjs, and .cjs files. The redundant .eslint.config.mjs section was removed.

Changes

EditorConfig pattern update

Layer / File(s) Summary
JavaScript file pattern
.editorconfig
The JavaScript pattern now applies max_line_length = 160 to .js, .mjs, and .cjs files.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 20c86

JavaScript, MJS, and CJS files now share the intended line-length setting, with the redundant MJS-specific override removed. No current merge-readiness risk is identified.

Poem

A rabbit checks the editor's tune
.mjs joins .js beneath the moon
.cjs follows, neat and bright
Long lines now meet the proper height
The config rests, clean and right

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The reviewable changes satisfy the .mjs and .cjs coverage requirements and remove the redundant configuration section. Synchronization of the installer baseline fixture cannot be verified because .vor… Provide reviewable evidence that the excluded installer baseline fixture matches the updated .editorconfig.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main changes: extending the .editorconfig line-length rule to .mjs and .cjs files and removing the redundant eslint.config.mjs section.
Out of Scope Changes check ✅ Passed The reviewed .editorconfig changes directly support the linked issue objectives. No unrelated changes are shown.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The reviewable changes satisfy the .mjs and .cjs coverage requirements and remove the redundant configuration section. Synchronization of the installer baseline fixture cannot be verified because .vortex/installer/tests/Fixtures/handler_process/_baseline/.editorconfig was excluded by the !.vortex/installer/tests/Fixtures/** path filter.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/editorconfig-mjs

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.56% (206/209)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.56% (206/209)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.00%. Comparing base (07d8658) to head (20c8652).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3083      +/-   ##
==========================================
- Coverage   87.36%   87.00%   -0.36%     
==========================================
  Files         107      100       -7     
  Lines        5088     4925     -163     
  Branches       49        3      -46     
==========================================
- Hits         4445     4285     -160     
+ Misses        643      640       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

📖 Documentation preview for this pull request has been deployed to Netlify:

https://6a9904612a258357eb91ba8f--vortex-docs.netlify.app

This preview is rebuilt on every commit and is not the production documentation site.

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Sep 3, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit 7be04c0 into main Sep 3, 2026
36 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/editorconfig-mjs branch September 3, 2026 05:43
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs review Pull request needs a review from assigned developers

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Cover '.mjs' in '.editorconfig' and drop the now-redundant 'eslint.config.mjs' section

1 participant