Skip to content

Commit

Permalink
MDL-79003 js: Bump stylelint and components
Browse files Browse the repository at this point in the history
Stylelint 15 deprecates a heap of rules which will be removed in 16.

We can't use 16 because it's ESM and requires a big restructure of our
build process.

We can temporarily silence the deprecations and then when we update our
build tooling we can make use of @stylistic/stylelint-plugin to add the
rules back.

This commit:
- bumps stylelint and related dependencies accordingly
- fixes issues identified with newer sniffs
- temporarily silences deprecation warnings
  • Loading branch information
andrewnicols committed Jan 30, 2024
1 parent bb64ff0 commit 3bea8ad
Show file tree
Hide file tree
Showing 6 changed files with 863 additions and 1,617 deletions.
6 changes: 5 additions & 1 deletion .grunt/tasks/stylelint.js
Expand Up @@ -29,6 +29,7 @@ module.exports = grunt => {
// Use a fully-qualified path.
src: files,
options: {
quietDeprecationWarnings: true,
configOverrides: {
rules: {
// These rules have to be disabled in .stylelintrc for scss compat.
Expand All @@ -45,7 +46,10 @@ module.exports = grunt => {
return {
stylelint: {
scss: {
options: {syntax: 'scss'},
options: {
quietDeprecationWarnings: true,
customSyntax: 'postcss-scss',
},
src: files,
},
},
Expand Down
20 changes: 16 additions & 4 deletions .stylelintrc
@@ -1,9 +1,14 @@
{
"customSyntax": "postcss-scss",
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": true,
"csstree/validator": {
"syntaxExtensions": [
"sass"
]
},
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
],
Expand Down Expand Up @@ -45,7 +50,7 @@
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-url-scheme-blacklist": ["data"],
"function-url-scheme-disallowed-list": ["data"],
"function-whitespace-after": "always",
"indentation": 4,
"keyframe-declaration-no-important": true,
Expand Down Expand Up @@ -84,12 +89,19 @@
"selector-type-no-unknown": true,
"string-no-newline": true,
"time-min-milliseconds": 100,
"unit-blacklist": ["pt"],
"unit-disallowed-list": ["pt"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
}
},
"overrides": [
{
"files": ["**/yui/**/*.css"],
"rules": {
}
}
]
}
@@ -1,4 +1,4 @@
/* stylelint-disable unit-blacklist */
/* stylelint-disable unit-disallowed-list */
/**************************************
Structure of the other user role assignment panel
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/styles.css
Expand Up @@ -789,9 +789,9 @@ table.quizreviewsummary td.cell {

#page-mod-quiz-edit ul.slots .activityinstance span.instancename {
overflow-x: hidden;
overflow-y: hidden;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
display: inline-block;
height: 20px;
}
Expand Down

0 comments on commit 3bea8ad

Please sign in to comment.