MDL-79003 js: Bump stylelint and components

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
This commit is contained in:
Andrew Nicols 2023-02-03 11:24:18 +08:00
parent 36ca488c06
commit 58bd2ed8e4
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
6 changed files with 858 additions and 1612 deletions

View File

@ -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.
@ -45,7 +46,10 @@ module.exports = grunt => {
return {
stylelint: {
scss: {
options: {syntax: 'scss'},
options: {
quietDeprecationWarnings: true,
customSyntax: 'postcss-scss',
},
src: files,
},
},

View File

@ -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"]}
],
@ -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,
@ -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": {
}
}
]
}

View File

@ -1,4 +1,4 @@
/* stylelint-disable unit-blacklist */
/* stylelint-disable unit-disallowed-list */
/**************************************
Structure of the other user role assignment panel

View File

@ -812,9 +812,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;
}

2432
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@
"grunt-eslint": "24.0.0",
"grunt-rollup": "^11.9.0",
"grunt-sass": "3.1.0",
"grunt-stylelint": "0.15.0",
"grunt-stylelint": "^0.19.0",
"hugo-bin": "^0.80.2",
"hugo-lunr-indexer": "^1.1.3",
"jsdoc": "^4.0.2",
@ -34,13 +34,13 @@
"jshint": "^2.13.4",
"jstoxml": "^3.2.3",
"npm-run-all": "^4.1.5",
"postcss-scss": "^4.0.9",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.58.3",
"semver": "7.3.5",
"shifter": "https://github.com/andrewnicols/shifter/archive/v1.2.0_moodle-0.tar.gz",
"stylelint": "13.3.3",
"stylelint-checkstyle-formatter": "0.1.2",
"stylelint-csstree-validator": "1.8.0",
"stylelint": "^15.11.0",
"stylelint-csstree-validator": "^3.0.0",
"xpath": "0.0.32"
},
"engines": {