Skip to content

Commit

Permalink
Fix messages for pattern rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jeddy3 committed Sep 18, 2021
1 parent 41c5f86 commit acc343a
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions index.js
Expand Up @@ -40,8 +40,18 @@ module.exports = {
ignore: ['after-comment', 'inside-single-line-block'],
},
],
'custom-media-pattern': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
'custom-property-pattern': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
'custom-media-pattern': [
/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
{
message: 'Expected custom media query name to be kebab-case',
},
],
'custom-property-pattern': [
/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
{
message: 'Expected custom property name to be kebab-case',
},
],
'declaration-bang-space-after': 'never',
'declaration-bang-space-before': 'always',
'declaration-block-semicolon-newline-after': 'always-multi-line',
Expand Down Expand Up @@ -72,7 +82,12 @@ module.exports = {
'function-whitespace-after': 'always',
'hue-degree-notation': 'angle',
indentation: 2,
'keyframes-name-pattern': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
'keyframes-name-pattern': [
/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
{
message: 'Expected keyframe name to be kebab-case',
},
],
'length-zero-no-unit': true,
'max-empty-lines': 1,
'max-line-length': 120,
Expand Down Expand Up @@ -106,11 +121,21 @@ module.exports = {
'selector-attribute-operator-space-after': 'never',
'selector-attribute-operator-space-before': 'never',
'selector-attribute-quotes': 'always',
'selector-class-pattern': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
'selector-class-pattern': [
/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
{
message: 'Expected class selector to be kebab-case',
},
],
'selector-combinator-space-after': 'always',
'selector-combinator-space-before': 'always',
'selector-descendant-combinator-no-non-space': true,
'selector-id-pattern': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
'selector-id-pattern': [
/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/,
{
message: 'Expected id selector to be kebab-case',
},
],
'selector-list-comma-newline-after': 'always',
'selector-list-comma-space-before': 'never',
'selector-max-empty-lines': 0,
Expand Down

0 comments on commit acc343a

Please sign in to comment.