@cfx-dev/stylelint-config-ui
Version:
cfx-dev's Stylelint config, following our styleguide
70 lines (67 loc) • 2.13 kB
JavaScript
/** @type {import('stylelint').Config} */
const varsPattern = "^[(a-z)|(_)][a-zA-Z0-9-]*$";
module.exports = {
extends: ["stylelint-config-standard-scss"],
ignoreFiles: ['**/*.js', '**/*.cjs', '**/*.ts', '**/*.mjs'],
plugins: [
"@stylistic/stylelint-plugin",
"stylelint-prettier",
],
rules: {
"prettier/prettier": [true, {
"useTabs": false,
"singleQuote": true,
"tabWidth": 2,
"printWidth": 120,
}],
'block-no-empty': true,
'color-named': 'never',
'color-no-invalid-hex': true,
'function-calc-no-unspaced-operator': true,
'function-linear-gradient-no-nonstandard-direction': true,
"number-max-precision": [
10,
{
message: "Expected number to have no more than 10 decimal places.",
},
],
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["global", "export"]
}
],
"selector-class-pattern": [
varsPattern,
{
message: "Expected class selector to be lowercase and only contain alphanumeric characters.",
},
],
"scss/at-function-pattern": [
varsPattern,
{
message: "Expected function name to be lowercase and only contain alphanumeric characters.",
},
],
"scss/dollar-variable-pattern": [
varsPattern,
{
message: "Expected variable name to be lowercase and only contain alphanumeric characters.",
},
],
"scss/at-mixin-pattern": [
varsPattern,
{
message: "Expected mixin name to be lowercase and only contain alphanumeric characters.",
},
],
'scss/at-extend-no-missing-placeholder': true,
'scss/at-rule-no-unknown': true,
'scss/declaration-nested-properties-no-divided-groups': true,
'scss/dollar-variable-no-missing-interpolation': true,
'scss/function-quote-no-quoted-strings-inside': true,
'scss/function-unquote-no-unquoted-strings-inside': true,
'scss/no-duplicate-mixins': true,
'scss/selector-no-redundant-nesting-selector': true,
}
};