Skip to content

Refactoring: clean up debug artifacts, deprecated code, and stale dependencies #773

@jjroelofs

Description

@jjroelofs

Summary

Several areas of the codebase contain debug artifacts, deprecated code, and stale dependencies that should be cleaned up to improve code quality and developer experience.

Improvements

Cleaning up these items will:

  • Remove a visible debug style from production output (blue dashed border)
  • Reduce cognitive load from commented-out legacy code
  • Eliminate confusing duplicate/deprecated dev dependencies
  • Prepare the project for ESLint v9 (v8 is EOL)

Risks

These changes are mostly deletions of dead code and dependency cleanup. Risk is low, but each item should be verified:

  • Removing the deprecated function should be confirmed as unused
  • ESLint v9 migration requires config format changes (flat config)
  • Removing Bootstrap 3 SCSS variables should be tested against Bootstrap 3 mode

Involved components

Debug artifact in production template

  • templates/page.html.twig:243 — inline style="border: 2px dashed blue" on action links. This is visible to end users and should be removed immediately.

Deprecated function

  • dxpr_theme_callbacks.inc:32dxpr_theme_color_module_css_write() is marked @deprecated and is an empty function. Should be removed along with any callers.

Stale SCSS code

  • scss/includes/_variables.scss — large blocks of commented-out Bootstrap 3 SCSS variables that add cognitive load. Should be removed (Bootstrap 3 support uses its own vendored CSS, not these SCSS vars).

Duplicate/stale dev dependencies (package.json)

  • babel-eslint ^10deprecated in favor of @babel/eslint-parser (which is already present as ^7). Remove the deprecated package.
  • grunt-postcss ^0.9.0 — the @lodder/grunt-postcss ^3.1.1 fork is also present. Remove the older unmaintained version.
  • eslint-plugin-spellcheck 0.0.20 — pinned at a very old version, evaluate if still needed.

ESLint v8 EOL

  • eslint ^8.57.0 is end-of-life. Plan migration to ESLint v9 with flat config format.

Empty vendor extension

  • scss/vendor-extensions/gin-toolbar.scss — only 2 lines (an @import with no actual styles). Evaluate if this file serves a purpose.

Optional: Intended side effects

  • Cleaner npm ls output with fewer deprecation warnings
  • Smaller SCSS file sizes improving IDE performance
  • No more blue dashed borders surprising site visitors

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions