-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylelint.config.js
37 lines (35 loc) · 1004 Bytes
/
stylelint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// @ts-check
/**
* @type {import('stylelint').Config}
*/
const config = {
extends: ['stylelint-config-standard', 'stylelint-config-hudochenkov/order'],
reportDescriptionlessDisables: true,
reportInvalidScopeDisables: true,
reportNeedlessDisables: true,
rules: {
// Handle unknown at-rules by allowing Tailwind-specific ones
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['tailwind', 'apply', 'variants', 'responsive', 'screen', 'layer']
}
],
// Enforce kebab-case naming convention for CSS classes
'selector-class-pattern': [
'^([a-z][a-z0-9]*)(-?-[a-z0-9]+)*$',
{
message:
'Expected class selector to be custom kebab-case with one or two dashes between words'
}
],
// Ignore unknown pseudo-classes with global being an exception (useful for CSS Modules)
'selector-pseudo-class-no-unknown': [
true,
{
ignorePseudoClasses: ['global']
}
]
}
}
export default config