2020-08-04 23:37:35 +02:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
module.exports = {
|
2023-03-20 19:52:55 +01:00
|
|
|
extends: ["stylelint-config-standard"],
|
2024-10-23 21:41:57 +02:00
|
|
|
plugins: ["stylelint-high-performance-animation"],
|
2020-08-04 23:37:35 +02:00
|
|
|
rules: {
|
2020-08-04 23:50:46 +02:00
|
|
|
// Add some exceptions for recommended rules
|
2023-03-20 21:49:44 +01:00
|
|
|
"at-rule-no-unknown": [true, {ignoreAtRules: ["extend"]}],
|
2021-04-03 03:37:00 +02:00
|
|
|
"font-family-no-missing-generic-family-keyword": [
|
|
|
|
true,
|
|
|
|
{ignoreFontFamilies: ["FontAwesome"]},
|
|
|
|
],
|
2020-08-04 23:50:46 +02:00
|
|
|
|
|
|
|
// Disable recommended rules we don't comply with yet
|
2023-07-21 23:08:07 +02:00
|
|
|
"media-query-no-invalid": null,
|
2020-08-04 23:50:46 +02:00
|
|
|
"no-descending-specificity": null,
|
|
|
|
|
2020-08-05 00:10:06 +02:00
|
|
|
// Disable standard rules we don't comply with yet
|
|
|
|
"comment-empty-line-before": null,
|
|
|
|
"declaration-empty-line-before": null,
|
2021-11-05 01:09:45 +01:00
|
|
|
"keyframes-name-pattern": null,
|
|
|
|
"selector-class-pattern": null,
|
|
|
|
"selector-id-pattern": null,
|
2020-08-05 00:43:16 +02:00
|
|
|
|
2020-08-04 23:37:35 +02:00
|
|
|
// Limit language features
|
2018-10-10 18:49:38 +02:00
|
|
|
"color-no-hex": true,
|
2019-01-23 00:33:18 +01:00
|
|
|
"color-named": "never",
|
2020-09-03 00:52:03 +02:00
|
|
|
"declaration-property-value-disallowed-list": {
|
2020-08-05 20:32:25 +02:00
|
|
|
// thin/medium/thick is under-specified, please use pixels
|
|
|
|
"/^(border(-top|-right|-bottom|-left)?|outline)(-width)?$/": [
|
|
|
|
/\b(thin|medium|thick)\b/,
|
|
|
|
],
|
2023-05-19 21:16:47 +02:00
|
|
|
// no quotation marks around grid-area; use
|
|
|
|
// `grid-area: my_area`, not `grid-area: "my_area"`
|
|
|
|
"grid-area": [/".*"/],
|
2020-08-05 20:32:25 +02:00
|
|
|
},
|
2020-09-03 00:52:03 +02:00
|
|
|
"function-disallowed-list": [
|
2023-03-20 22:08:47 +01:00
|
|
|
// We use hsl instead of rgb
|
2020-08-05 20:32:25 +02:00
|
|
|
"rgb",
|
|
|
|
],
|
2024-10-23 21:41:57 +02:00
|
|
|
"plugin/no-low-performance-animation-properties": [true, {ignore: "paint-properties"}],
|
2020-08-05 20:32:25 +02:00
|
|
|
|
|
|
|
// Zulip CSS should have no dependencies on external resources
|
|
|
|
"function-url-no-scheme-relative": true,
|
2021-07-20 20:33:48 +02:00
|
|
|
"function-url-scheme-allowed-list": [
|
2023-04-09 05:22:23 +02:00
|
|
|
"data", // Allow data URLs
|
2021-07-20 20:33:48 +02:00
|
|
|
],
|
2020-08-04 23:37:35 +02:00
|
|
|
},
|
|
|
|
};
|