A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://phabricator.wikimedia.org/T394964 below:

⚓ T394964 Allow customization of Stylelint and ESLint rules in CodeMirror

Adjacent to T394965: Add call to action to perform server-provided linting of JS, CSS and wikitext in CodeMirror

Background

T373711: Add support for Scribunto, JavaScript, CSS, JSON and Vue to CodeMirror 6 adds support for JS/CSS/JSON and Scribuntu. It also brought linting into the CodeMirror 6 ecosystem.

At the Wikimedia-Hackathon-2025, we spoke with the Editing team who asked us not to impose any stylistic preferences in our linters. So, for CSS we went with stylelint-config-recommended which primarily only prevents errors.

We are free however to allow users to opt-in to a coding style. The CodeMirror preferences system allows for this without adding more user options to the db, so I think the idea is worth exploring.

This idea applies to both Stylelint and the upcoming ESLint integration.

A collection of ideas

Event Timeline Comment Actions

Add some sort of comment-based annotation to tell CodeMirror which style to use.

CodeEditor's JSHint allows in-page customization of linter rules using comments like /* jshint esversion:10 */ and similar. I think the same will be possible with ESlint?

Alternatively, it could be stored as page prop

Page props are an artifact of parsing. So you'll need some kind of annotation in the text to begin with.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4