tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7becdd1b439e7fd963556c970461eeeec2f19988
parent d5857d6a53cc6df60b0019a3ca484ae4da069351
Author: Osmond Arnesto <oarnesto@mozilla.com>
Date:   Tue,  4 Nov 2025 04:38:40 +0000

Bug 1956526 - install stylelint plugin to enforce logical properties r=Standard8,hjones

Differential Revision: https://phabricator.services.mozilla.com/D269925

Diffstat:
M.stylelintrc.js | 12++++++++++++
Mpackage-lock.json | 14++++++++++++++
Mpackage.json | 1+
3 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/.stylelintrc.js b/.stylelintrc.js @@ -29,6 +29,7 @@ module.exports = { plugins: [ "./tools/lint/stylelint/stylelint-plugin-mozilla/index.mjs", "@stylistic/stylelint-plugin", + "stylelint-use-logical", ], ignoreFiles, rules: { @@ -269,6 +270,9 @@ module.exports = { ignorePseudoElements: ["slider-track", "slider-fill", "slider-thumb"], }, ], + // stylelint fixes for the use-logical rule will be addressed in Bug 1996168 + // Remove this line setting `csscontrols/use-logical` to null after implementing fixes + "csstools/use-logical": null, "stylelint-plugin-mozilla/no-base-design-tokens": true, "stylelint-plugin-mozilla/use-background-color-tokens": true, "stylelint-plugin-mozilla/use-border-color-tokens": true, @@ -450,6 +454,14 @@ module.exports = { "stylelint-plugin-mozilla/no-browser-refs-in-toolkit": true, }, }, + { + // non-logical properties make sense in devtools/ where physical positioning always makes sense + name: "logical-properties-rule-off", + files: ["devtools/**"], + rules: { + "csstools/use-logical": null, + }, + }, // Rollouts should always be applied last in the overrides section // to ensure that they take precedence over other overrides. ...rollouts, diff --git a/package-lock.json b/package-lock.json @@ -31,6 +31,7 @@ "stylelint": "16.14.1", "stylelint-config-recommended": "14.0.1", "stylelint-config-standard-scss": "14.0.0", + "stylelint-use-logical": "2.1.2", "ts-patch": "3.3.0", "typescript": "5.9.3", "yarn": "1.22.22" @@ -6907,6 +6908,19 @@ "node": ">=4" } }, + "node_modules/stylelint-use-logical": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/stylelint-use-logical/-/stylelint-use-logical-2.1.2.tgz", + "integrity": "sha512-4ffvPNk/swH4KS3izExWuzQOuzLmi0gb0uOhvxWJ20vDA5W5xKCjcHHtLoAj1kKvTIX6eGIN5xGtaVin9PD0wg==", + "dev": true, + "license": "CC0-1.0", + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "stylelint": ">= 11 < 17" + } + }, "node_modules/stylelint/node_modules/@csstools/media-query-list-parser": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.3.tgz", diff --git a/package.json b/package.json @@ -30,6 +30,7 @@ "stylelint": "16.14.1", "stylelint-config-recommended": "14.0.1", "stylelint-config-standard-scss": "14.0.0", + "stylelint-use-logical": "2.1.2", "ts-patch": "3.3.0", "typescript": "5.9.3", "yarn": "1.22.22"