Skip to content

Commit ffca7ce

Browse files
committed
feat: add 70+ rules
1 parent 0541989 commit ffca7ce

File tree

72 files changed

+789
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+789
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export type KeyframeBlockNoDuplicateSelectorsOptions = RuleConfig<
4+
true,
5+
{
6+
message?: string | ((selector: string) => string)
7+
}
8+
>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export type KeyframeDeclarationNoImportantOptions = RuleConfig<
4+
true
5+
>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export type KeyframeSelectorNotationOptions = RuleConfig<
4+
'keyword' | 'percentage' | 'percentage-unless-within-keyword-only-block',
5+
{
6+
message?: string | ((selector: string, fixedSelector: string) => string)
7+
}
8+
>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export type KeyframesNamePatternOptions = RuleConfig<
4+
string | RegExp,
5+
{
6+
message?: string | ((keyframeName: string, pattern: string) => string)
7+
}
8+
>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { RuleConfig } from '../rule-config'
2+
import type { CSSFunction } from '../../types'
3+
import type { RegExpLike } from '../../utils'
4+
5+
type LengthZeroNoUnitIgnore = 'custom-properties'
6+
7+
export interface LengthZeroNoUnitSecondaryOptions {
8+
ignore?: [LengthZeroNoUnitIgnore]
9+
ignoreFunctions?: (CSSFunction | RegExpLike)[]
10+
}
11+
12+
export type LengthZeroNoUnitOptions = RuleConfig<
13+
true,
14+
LengthZeroNoUnitSecondaryOptions
15+
>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { AtRules } from '../../types'
2+
import type { RuleConfig } from '../rule-config'
3+
4+
type MaxNestingDepthIgnore = 'blockless-at-rules' | 'pseudo-classes'
5+
6+
export interface MaxNestingDepthSecondaryOptions {
7+
ignore?: [MaxNestingDepthIgnore]
8+
ignoreAtRules?: (AtRules | RegExp)[]
9+
message?: string | ((depth: string) => string)
10+
}
11+
12+
export type MaxNestingDepthOptions = RuleConfig<
13+
number,
14+
MaxNestingDepthSecondaryOptions
15+
>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { RuleConfig } from '../rule-config'
2+
import type { MediaFeatureLevel5, MediaFeatureNormal } from '../../types'
3+
import type { RegExpLike } from '../../utils'
4+
5+
type MediaFeatureNameAllowed = MediaFeatureNormal | MediaFeatureLevel5 | RegExpLike
6+
7+
export type MediaFeatureNameAllowedListOptions = RuleConfig<
8+
MediaFeatureNameAllowed | (MediaFeatureNameAllowed)[],
9+
{
10+
message?: string | ((name: string) => string)
11+
}
12+
>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { RuleConfig } from '../rule-config'
2+
import type { MediaFeatureLevel5, MediaFeatureNormal } from '../../types'
3+
import type { RegExpLike } from '../../utils'
4+
5+
type MediaFeatureNameDisallowed = MediaFeatureNormal | MediaFeatureLevel5 | RegExpLike
6+
7+
export type MediaFeatureNameDisallowedListOptions = RuleConfig<
8+
MediaFeatureNameDisallowed | (MediaFeatureNameDisallowed)[],
9+
{
10+
message?: string | ((name: string) => string)
11+
}
12+
>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export interface MediaFeatureNameNoUnknownSecondaryOptions {
4+
ignoreMediaFeatureNames?: (string | RegExp)[]
5+
message?: string | ((mediaFeatureName: string) => string)
6+
}
7+
8+
export type MediaFeatureNameNoUnknownOptions = RuleConfig<
9+
true,
10+
MediaFeatureNameNoUnknownSecondaryOptions
11+
>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { RuleConfig } from '../rule-config'
2+
3+
export type MediaFeatureNameNoVendorPrefixOptions = RuleConfig<
4+
true
5+
>

0 commit comments

Comments
 (0)