File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 6565 "conventional-changelog-cli" : " ^4.1.0" ,
6666 "eslint" : " ^8.56.0" ,
6767 "stylelint" : " ^16.2.1" ,
68- "stylelint-define-config" : " file:." ,
6968 "tsup" : " ^8.0.2" ,
7069 "typescript" : " ^5.3.3"
7170 }
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ import type { UnitDisallowedListOptions } from './unit-disallowed-list'
123123import type { UnitNoUnknownOptions } from './unit-no-unknown'
124124import type { ValueKeywordCaseOptions } from './value-keyword-case'
125125import type { ValueNoVendorPrefixOptions } from './value-no-vendor-prefix'
126+ import type { LightnessNotationOptions } from './lightness-notation'
126127
127128/**
128129 * Rules determine what the linter looks for and complains about.
@@ -1386,6 +1387,28 @@ export interface StyleLintRules {
13861387 */
13871388 'length-zero-no-unit' : LengthZeroNoUnitOptions
13881389
1390+ /**
1391+ * Specify number or percentage notation for lightness.
1392+ *
1393+ * ```scss
1394+ * a { color: oklch(85% 0.17 88) }
1395+ * // ^^^
1396+ * // This notation
1397+ * ```
1398+ *
1399+ * This rule supports `oklch`, `oklab`, `lch` and `lab` functions.
1400+ *
1401+ * ### Primary Options
1402+ *
1403+ * string: `"percentage"|"number"`
1404+ *
1405+ * - `"percentage"`: Lightness must always use the percentage notation.
1406+ * - `"number"`: Lightness must always use the number notation.
1407+ *
1408+ * @see [lightness-notation](https://stylelint.io/user-guide/rules/lightness-notation)
1409+ */
1410+ 'lightness-notation' : LightnessNotationOptions
1411+
13891412 /**
13901413 * Limit the depth of nesting.
13911414 *
Original file line number Diff line number Diff line change 1+ import type { RuleConfig } from '../rule-config'
2+
3+ export type LightnessNotationOptions = RuleConfig <
4+ 'percentage' | 'number' ,
5+ {
6+ message ?: string | ( ( unfixed : string , fixed : string ) => string )
7+ }
8+ >
You can’t perform that action at this time.
0 commit comments