ui_migration bugfix(stylelint) Add configuration overrides to protect UIkit and VUE LESS and color parsing
This commit is contained in:
parent
359558f012
commit
a4b167b147
1 changed files with 14 additions and 9 deletions
|
|
@ -1,30 +1,35 @@
|
||||||
// stylelint.config.mjs
|
// stylelint.config.mjs
|
||||||
export default {
|
export default {
|
||||||
// This applies standard CSS rules to the whole project by default
|
|
||||||
extends: ["stylelint-config-standard"],
|
extends: ["stylelint-config-standard"],
|
||||||
|
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
|
// VUE FILES OVERRIDE
|
||||||
files: ["**/*.vue"],
|
files: ["**/*.vue"],
|
||||||
customSyntax: "postcss-html",
|
customSyntax: "postcss-html",
|
||||||
// If you write <style lang="less"> inside Vue components and get
|
rules: {
|
||||||
// the same error there, uncomment the rule below:
|
// Stop Stylelint from throwing errors when it sees
|
||||||
// rules: { "declaration-property-value-no-unknown": null }
|
// LESS functions (like darken, lighten, desaturate) inside Vue files.
|
||||||
|
"declaration-property-value-no-unknown": null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
// LESS FILES OVERRIDE
|
||||||
files: ["**/*.less"],
|
files: ["**/*.less"],
|
||||||
customSyntax: "postcss-less",
|
customSyntax: "postcss-less",
|
||||||
// THIS IS THE FIX: Tell Stylelint to apply LESS-specific
|
extends: ["stylelint-config-standard-less"],
|
||||||
// rules (which ignore @ variables) only to these files.
|
|
||||||
extends: ["stylelint-config-standard-less"],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
// UIKit class naming doesn't match Stylelint's default class pattern
|
// Your global rules
|
||||||
"selector-class-pattern": null,
|
"selector-class-pattern": null,
|
||||||
// Less @import is fine
|
|
||||||
"no-invalid-position-at-import-rule": null,
|
"no-invalid-position-at-import-rule": null,
|
||||||
"no-empty-source": null,
|
"no-empty-source": null,
|
||||||
|
|
||||||
|
// Needed rgba for UIkit colot math
|
||||||
|
"color-function-notation": null,
|
||||||
|
"alpha-value-notation": null,
|
||||||
|
"color-function-alias-notation": null
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue