Skip to content

Commit 53b8d11

Browse files
committed
feat(interfaces): RulesConfig
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent c4b8b70 commit 53b8d11

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* @file Type Tests - RulesConfig
3+
* @module commitlint-config/interfaces/tests/unit-d/RulesConfig
4+
*/
5+
6+
import type * as commitlint from '@commitlint/types'
7+
import type TestSubject from '../config-rules'
8+
9+
describe('unit-d:interfaces/RulesConfig', () => {
10+
it('should extend Required<commitlint.RulesConfig<commitlint.RuleConfigQuality.Qualified>>', () => {
11+
expectTypeOf<TestSubject>().toMatchTypeOf<
12+
Required<commitlint.RulesConfig<commitlint.RuleConfigQuality.Qualified>>
13+
>()
14+
})
15+
})

src/interfaces/config-rules.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @file Interfaces - RulesConfig
3+
* @module commitlint-config/interfaces/RulesConfig
4+
*/
5+
6+
import type * as commitlint from '@commitlint/types'
7+
import type { RuleConfigQuality } from '@commitlint/types'
8+
9+
/**
10+
* Object representing commit rules for [Flex Development][1].
11+
*
12+
* [1]: https://flexdevelopment.llc
13+
*
14+
* @see https://commitlint.js.org/#/reference-rules
15+
*
16+
* @extends {Required<commitlint.RulesConfig<RuleConfigQuality.Qualified>>}
17+
*/
18+
interface RulesConfig
19+
extends Required<commitlint.RulesConfig<RuleConfigQuality.Qualified>> {}
20+
21+
export type { RulesConfig as default }

src/interfaces/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
*/
55

66
export type { default as PromptConfig } from './config-prompt'
7+
export type { default as RulesConfig } from './config-rules'
78
export type { default as ParserOptions } from './options-parser'

0 commit comments

Comments
 (0)