Skip to content

Commit 7138d1a

Browse files
committed
add descriptions to rules
1 parent 92639f3 commit 7138d1a

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/dictionary/dictionary.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,36 @@ const rules: Rule[] = [
66
name: 'imports-keyword',
77
type: 'keyword',
88
default: 'import',
9-
conflicts: []
9+
conflicts: [],
10+
description:'Determines which keyword should be used to import modules using defined in an imports statement.'
1011
},
1112
{
1213
name: 'function-value-return-enabled',
1314
type: 'boolean',
1415
default: false,
15-
conflicts: []
16+
conflicts: [],
17+
description: 'Determines whether is it possible to return a value from a function using a keyword.'
1618
},
1719
{
1820
name: 'function-value-return-keyword',
1921
type: 'keyword',
2022
default: 'return',
21-
conflicts: []
23+
conflicts: [],
24+
description: 'Determines the keyword used to return a function from a keyword. Must be used with `function-value-return-enabled` set to true to make a difference.'
2225
},
2326
{
2427
name: 'enforce-single-string-quotes',
2528
type: 'boolean',
2629
default: false,
27-
conflicts: ['enforge-double-string-quotes']
30+
conflicts: ['enforge-double-string-quotes'],
31+
description: 'Enforces string values to have single quotes in output. Useful for languages like Java where quote type matters.'
2832
},
2933
{
3034
name: 'enforce-double-string-quotes',
3135
type: 'boolean',
3236
default: false,
33-
conflicts: ['enforce-single-string-quotes']
37+
conflicts: ['enforce-single-string-quotes'],
38+
description: 'Enforces string values to have double quotes in output. Useful for languages like Java where quote type matters.'
3439
}
3540
];
3641

src/dictionary/rules.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ export type RuleType = 'keyword' | 'boolean';
66
/**
77
* Base interface for rules. Represents a rule that can be modified by any file using `rule` modifier.
88
* @author efekos
9-
* @version 1.0.0
10-
* @since 0.0.1-alpha
9+
* @version 1.0.1
10+
* @since 0.0.2-alpha
1111
*/
1212
export interface BaseRule {
1313
name: string;
1414
type: RuleType;
1515
conflicts: string[];
16+
description: string;
1617
}
1718

1819
/**

0 commit comments

Comments
 (0)