File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ import type { RuleConfig } from './rule-config'
2+ import type { StyleLintRules } from './stylelint'
3+
4+ /**
5+ * This is a special exported interface for other packages to declare
6+ * additional types that should bail out for eslint rules. For example
7+ * `stylelint-scss` can declare it like so in its `d.ts`:
8+ *
9+ * ```ts
10+ * import type { RuleConfig } from 'stylelint-define-config';
11+ * declare module 'stylelint-define-config' {
12+ * export interface CustomRuleOptions {
13+ * 'scss/at-else-closing-brace-newline-after': RuleConfig<
14+ * "always-last-in-chain",
15+ * { disableFix?: boolean }
16+ * >
17+ *
18+ * // ... more Rules
19+ * }
20+ * }
21+ * ```
22+ */
23+ export interface CustomRuleOptions { }
24+
25+ type CustomRules = {
26+ [ TRuleName in keyof CustomRuleOptions ] : CustomRuleOptions [ TRuleName ]
27+ }
28+
29+ /**
30+ * Rules determine what the linter looks for and complains about.
31+ * There are {@link https://stylelint.io/user-guide/rules over 100 rules} built into Stylelint. No rules are turned on by default.
32+ */
33+ export interface Rules extends
34+ StyleLintRules ,
35+ CustomRules ,
36+ Record < string , RuleConfig > { }
You can’t perform that action at this time.
0 commit comments