mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 23:59:41 +02:00
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:
parent
d851f109ef
commit
484da7c0e8
6 changed files with 858 additions and 1612 deletions
|
@ -29,6 +29,7 @@ module.exports = grunt => {
|
||||||
// Use a fully-qualified path.
|
// Use a fully-qualified path.
|
||||||
src: files,
|
src: files,
|
||||||
options: {
|
options: {
|
||||||
|
quietDeprecationWarnings: true,
|
||||||
configOverrides: {
|
configOverrides: {
|
||||||
rules: {
|
rules: {
|
||||||
// These rules have to be disabled in .stylelintrc for scss compat.
|
// These rules have to be disabled in .stylelintrc for scss compat.
|
||||||
|
@ -45,7 +46,10 @@ module.exports = grunt => {
|
||||||
return {
|
return {
|
||||||
stylelint: {
|
stylelint: {
|
||||||
scss: {
|
scss: {
|
||||||
options: {syntax: 'scss'},
|
options: {
|
||||||
|
quietDeprecationWarnings: true,
|
||||||
|
customSyntax: 'postcss-scss',
|
||||||
|
},
|
||||||
src: files,
|
src: files,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
20
.stylelintrc
20
.stylelintrc
|
@ -1,9 +1,14 @@
|
||||||
{
|
{
|
||||||
|
"customSyntax": "postcss-scss",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"stylelint-csstree-validator"
|
"stylelint-csstree-validator"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"csstree/validator": true,
|
"csstree/validator": {
|
||||||
|
"syntaxExtensions": [
|
||||||
|
"sass"
|
||||||
|
]
|
||||||
|
},
|
||||||
"at-rule-empty-line-before": [ "always",
|
"at-rule-empty-line-before": [ "always",
|
||||||
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
|
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
|
||||||
],
|
],
|
||||||
|
@ -45,7 +50,7 @@
|
||||||
"function-name-case": "lower",
|
"function-name-case": "lower",
|
||||||
"function-parentheses-newline-inside": "always-multi-line",
|
"function-parentheses-newline-inside": "always-multi-line",
|
||||||
"function-parentheses-space-inside": "never-single-line",
|
"function-parentheses-space-inside": "never-single-line",
|
||||||
"function-url-scheme-blacklist": ["data"],
|
"function-url-scheme-disallowed-list": ["data"],
|
||||||
"function-whitespace-after": "always",
|
"function-whitespace-after": "always",
|
||||||
"indentation": 4,
|
"indentation": 4,
|
||||||
"keyframe-declaration-no-important": true,
|
"keyframe-declaration-no-important": true,
|
||||||
|
@ -84,12 +89,19 @@
|
||||||
"selector-type-no-unknown": true,
|
"selector-type-no-unknown": true,
|
||||||
"string-no-newline": true,
|
"string-no-newline": true,
|
||||||
"time-min-milliseconds": 100,
|
"time-min-milliseconds": 100,
|
||||||
"unit-blacklist": ["pt"],
|
"unit-disallowed-list": ["pt"],
|
||||||
"unit-case": "lower",
|
"unit-case": "lower",
|
||||||
"unit-no-unknown": true,
|
"unit-no-unknown": true,
|
||||||
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
|
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
|
||||||
"value-list-comma-newline-after": "always-multi-line",
|
"value-list-comma-newline-after": "always-multi-line",
|
||||||
"value-list-comma-space-after": "always-single-line",
|
"value-list-comma-space-after": "always-single-line",
|
||||||
"value-list-comma-space-before": "never",
|
"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
|
Structure of the other user role assignment panel
|
||||||
|
|
|
@ -790,9 +790,9 @@ table.quizreviewsummary td.cell {
|
||||||
|
|
||||||
#page-mod-quiz-edit ul.slots .activityinstance span.instancename {
|
#page-mod-quiz-edit ul.slots .activityinstance span.instancename {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
overflow-y: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
2432
npm-shrinkwrap.json
generated
2432
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load diff
|
@ -27,7 +27,7 @@
|
||||||
"grunt-eslint": "24.0.0",
|
"grunt-eslint": "24.0.0",
|
||||||
"grunt-rollup": "^11.9.0",
|
"grunt-rollup": "^11.9.0",
|
||||||
"grunt-sass": "3.1.0",
|
"grunt-sass": "3.1.0",
|
||||||
"grunt-stylelint": "0.15.0",
|
"grunt-stylelint": "^0.19.0",
|
||||||
"hugo-bin": "^0.80.2",
|
"hugo-bin": "^0.80.2",
|
||||||
"hugo-lunr-indexer": "^1.1.3",
|
"hugo-lunr-indexer": "^1.1.3",
|
||||||
"jsdoc": "^4.0.2",
|
"jsdoc": "^4.0.2",
|
||||||
|
@ -35,13 +35,13 @@
|
||||||
"jshint": "^2.13.4",
|
"jshint": "^2.13.4",
|
||||||
"jstoxml": "^3.2.3",
|
"jstoxml": "^3.2.3",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
|
"postcss-scss": "^4.0.9",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"sass": "^1.58.3",
|
"sass": "^1.58.3",
|
||||||
"semver": "7.3.5",
|
"semver": "7.3.5",
|
||||||
"shifter": "https://github.com/andrewnicols/shifter/archive/v1.2.0_moodle-0.tar.gz",
|
"shifter": "https://github.com/andrewnicols/shifter/archive/v1.2.0_moodle-0.tar.gz",
|
||||||
"stylelint": "13.3.3",
|
"stylelint": "^15.11.0",
|
||||||
"stylelint-checkstyle-formatter": "0.1.2",
|
"stylelint-csstree-validator": "^3.0.0",
|
||||||
"stylelint-csstree-validator": "1.8.0",
|
|
||||||
"xpath": "0.0.32"
|
"xpath": "0.0.32"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue