Page MenuHomePhabricator

Use a class selector pattern for "new" less code.
Closed, ResolvedPublic

Description

Description
We are gonna be re-writing many of our styles due to the markup changes that using Vue and Codex will require. This is an opportunity to enforce a stylelint rule in our repository to better comply with MW CSS coding convention on naming. We would do it on a per-module basis to avoid having to change legacy classes all at once.

"rules": {
  "selector-class-pattern": "^ext-growthExperiments-"
}

See stylelint selector-class-pattern/ rule documentation.

Other suggested names:

  • <pattern>, <reasons for the pattern proposed>

Acceptance Criteria

  1. All Vue modules should pass the stylelint check.
Completion checklist

Functionality

  • The patches have been code reviewed and merged
  • The task passes its acceptance criteria

Engineering

  • There are existing and passing unit/integration tests
  • Tests for every involved patch should pass
  • Coverage for every involved project should have improved or stayed the same

Event Timeline

Change 817891 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Enforce a selector class pattern in vue modules

https://gerrit.wikimedia.org/r/817891

Change 817891 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Enforce a selector class pattern in vue modules

https://gerrit.wikimedia.org/r/817891

Etonkovidova updated the task description. (Show Details)