Skip to content

Commit dd2f701

Browse files
committed
lint
1 parent 2f2aabb commit dd2f701

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

__tests__/namespace-spacing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import dedent from 'dedent'
44
const plugins = [plugin]
55
const {
66
ruleName,
7-
rule: { messages },
7+
rule: {messages},
88
} = plugin
99

1010
// General CSS Tests

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import typography from './plugins/typography.js'
99
import noDisplayColors from './plugins/no-display-colors.js'
1010
import namespaceSpacing from './plugins/namespace-spacing.js'
1111

12-
import { createRequire } from 'node:module'
12+
import {createRequire} from 'node:module'
1313

1414
const require = createRequire(import.meta.url)
1515

@@ -58,7 +58,7 @@ export default {
5858
},
5959
],
6060
'custom-property-pattern': null,
61-
'declaration-block-no-duplicate-properties': [true, { ignore: ['consecutive-duplicates'] }],
61+
'declaration-block-no-duplicate-properties': [true, {ignore: ['consecutive-duplicates']}],
6262
'declaration-block-no-redundant-longhand-properties': null,
6363
'declaration-block-no-shorthand-property-overrides': true,
6464
'declaration-property-value-disallowed-list': {
@@ -75,7 +75,7 @@ export default {
7575
'media-feature-name-no-vendor-prefix': null,
7676
'no-descending-specificity': null,
7777
'no-duplicate-selectors': true,
78-
'no-invalid-position-at-import-rule': [true, { ignoreAtRules: ['use'] }],
78+
'no-invalid-position-at-import-rule': [true, {ignoreAtRules: ['use']}],
7979
'number-max-precision': null,
8080
'plugin/browser-compat': [
8181
true,
@@ -186,7 +186,7 @@ export default {
186186
],
187187
'selector-pseudo-class-no-unknown': [
188188
true,
189-
{ ignorePseudoClasses: ['export', 'import', 'global', 'local', 'external'] },
189+
{ignorePseudoClasses: ['export', 'import', 'global', 'local', 'external']},
190190
],
191191
'selector-type-no-unknown': [
192192
true,

plugins/namespace-spacing.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import stylelint from 'stylelint'
22

33
const {
44
createPlugin,
5-
utils: { report, ruleMessages, validateOptions },
5+
utils: {report, ruleMessages, validateOptions},
66
} = stylelint
77

88
export const ruleName = 'primer/namespace-spacing'
@@ -16,20 +16,20 @@ export const messages = ruleMessages(ruleName, {
1616
// Matches patterns like .m-*, .p-*, .mt-*, .mb-*, .ml-*, .mr-*, .mx-*, .my-*
1717
// .pt-*, .pb-*, .pl-*, .pr-*, .px-*, .py-*
1818
const UTILITY_PATTERNS = [
19-
/^m-\d+$/, // .m-0, .m-1, .m-2, etc.
20-
/^mt-\d+$/, // .mt-0, .mt-1, etc.
21-
/^mr-\d+$/, // .mr-0, .mr-1, etc.
22-
/^mb-\d+$/, // .mb-0, .mb-1, etc.
23-
/^ml-\d+$/, // .ml-0, .ml-1, etc.
24-
/^mx-\d+$/, // .mx-0, .mx-1, etc.
25-
/^my-\d+$/, // .my-0, .my-1, etc.
26-
/^p-\d+$/, // .p-0, .p-1, .p-2, etc.
27-
/^pt-\d+$/, // .pt-0, .pt-1, etc.
28-
/^pr-\d+$/, // .pr-0, .pr-1, etc. (note: this is directional padding-right, not prefix)
29-
/^pb-\d+$/, // .pb-0, .pb-1, etc.
30-
/^pl-\d+$/, // .pl-0, .pl-1, etc.
31-
/^px-\d+$/, // .px-0, .px-1, etc.
32-
/^py-\d+$/, // .py-0, .py-1, etc.
19+
/^m-\d+$/, // .m-0, .m-1, .m-2, etc.
20+
/^mt-\d+$/, // .mt-0, .mt-1, etc.
21+
/^mr-\d+$/, // .mr-0, .mr-1, etc.
22+
/^mb-\d+$/, // .mb-0, .mb-1, etc.
23+
/^ml-\d+$/, // .ml-0, .ml-1, etc.
24+
/^mx-\d+$/, // .mx-0, .mx-1, etc.
25+
/^my-\d+$/, // .my-0, .my-1, etc.
26+
/^p-\d+$/, // .p-0, .p-1, .p-2, etc.
27+
/^pt-\d+$/, // .pt-0, .pt-1, etc.
28+
/^pr-\d+$/, // .pr-0, .pr-1, etc. (note: this is directional padding-right, not prefix)
29+
/^pb-\d+$/, // .pb-0, .pb-1, etc.
30+
/^pl-\d+$/, // .pl-0, .pl-1, etc.
31+
/^px-\d+$/, // .px-0, .px-1, etc.
32+
/^py-\d+$/, // .py-0, .py-1, etc.
3333
]
3434

3535
// Check if a class name matches any utility pattern
@@ -62,7 +62,7 @@ const ruleFunction = primary => {
6262

6363
root.walkRules(rule => {
6464
// Parse the selector to extract class names
65-
const { selector } = rule
65+
const {selector} = rule
6666

6767
// Match all class selectors in the rule
6868
// This regex matches .classname patterns

0 commit comments

Comments
 (0)