[PP-upstream] Update stylelint(-config-standard) to latest versions (major bump)

Created on 9 December 2023, 9 months ago
Updated 12 December 2023, 9 months ago

Problem/Motivation

stylelint released a new major version (https://github.com/stylelint/stylelint/releases/tag/16.0.1).

Related:

stylelint-config-standard followed suit. (https://github.com/stylelint/stylelint-config-standard/releases/tag/35.0.0)
stylelint-order only bumped a minor version (https://github.com/hudochenkov/stylelint-order/releases/tag/6.0.4)

Steps to reproduce

$ yarn outdated

Proposed resolution

Remaining tasks

_If_ we can and want to ship this with drupal 10.2.0, I think we need to decide if we want to wait on stylelint-formatter-gitlab to be stylelint:^16-ready, in order to keep our nice code-quality overview in GitLab or (temporarily) go back to the situation before ✨ [PP-1] Move Gitlab linting steps to main job Active where CSS linting failures are reported as test-failures.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component
JavascriptΒ  β†’

Last updated 1 day ago

Created by

πŸ‡³πŸ‡±Netherlands Spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Spokje
  • πŸ‡³πŸ‡±Netherlands Spokje
  • πŸ‡³πŸ‡±Netherlands Spokje
  • πŸ‡³πŸ‡±Netherlands Spokje
  • πŸ‡³πŸ‡±Netherlands Spokje
  • πŸ‡³πŸ‡±Netherlands Spokje
  • Status changed to Needs review 9 months ago
  • πŸ‡³πŸ‡±Netherlands Spokje

    So the current state of the MR uses stylelint-junit-formatter.
    I also opened https://gitlab.com/leon0399/stylelint-formatter-gitlab/-/issues/3 to try and get stylelint-formatter-gitlab working with stylelint 16 and upwards.

    Putting this on NR the get some input on:
    - if we want to try and get this into 10.2.0
    - if so, are we prepared to (temporarily) fallback to using stylelint-junit-formatter and going back to test-errors instead of codequality.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    The rules being removed does prettier automatically catch those now?

  • πŸ‡³πŸ‡±Netherlands Spokje

    The rules being removed does prettier automatically catch those now?

    Not quite, but good question.

    - stylelint has loads of rules, but enables none of them by default.
    - stylelint-config-standard enables a bunch of them with some community-defined, sane defaults

    Drupal uses a lot of those stylelint-config-standard rules, but overrules some of them with other defaults, and disables others.

    The latter one is of interest here. When there's a "[rule-name]": null defined in core/.stylelintrc.json, it _should_ mean stylelint-config-standard-enabled rule, Drupal turns it off. (More on the _should_ below).

    The rules that are removed in this issue (function-whitespace-after and max-line-length), were both defined as null, so were turned off in Drupal, so no need for replacement.

    Now to the _should_: Turns out during all updates of stylelint and stylelint-config-standard we didn't pay much attention to rules that were dropped at some point from stylelint-config-standard but still being turned off in our core/.stylelintrc.json.
    Turning things off that aren't on in the first place is just silly.

    Opened [#] to get core/.stylelintrc.json, stylelint and stylelint-config-standard back into sync.

  • Status changed to RTBC 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thanks for explaining!

  • Status changed to Postponed 9 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Thank you for explaining the changes in #10.

    As this breaks our current CI integration because stylelint-formatter-gitlab is not yet compatible, I think we should hold off on committing this for a while - there are no pressing changes here and to me this can wait until 10.3.

Production build 0.71.5 2024