Skip to content

Commit ecb1d74

Browse files
committed
🐛 Fix: change emojies default to true
1 parent 5b8c15d commit ecb1d74

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.sgcrc_default

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"emojies": true,
32
"types": [
43
{
54
"emoji": ":wrench:",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ A boolean to enable emojies at the beginning of a commit message
5656
Example:
5757
```json
5858
{
59-
"emojies": false
59+
"emojies": true
6060
}
6161
```
6262

lib/promptConfig.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const choices = (configuration) => {
55
const choicesList = [];
66

77
configuration.types.forEach((type) => {
8-
const emoji = configuration.emojies && type.emoji ? `${type.emoji} ` : '';
8+
const isEmojies = configuration.emojies === undefined ? true : configuration.emojies;
9+
const emoji = isEmojies && type.emoji ? `${type.emoji} ` : '';
910
const configType = type.type;
1011
const description = type.description || '';
1112

test/promptConfig.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ test('get configuration file equals .sgcrc_default', (t) => {
3737

3838
test('choices are rendered without emojis', (t) => {
3939
const sgc = getConfig(path.join(fixtures, '.sgcrc'));
40+
41+
sgc.emojies = false;
42+
4043
const choicesList = choices(sgc);
4144

4245
t.deepEqual(choicesList, withoutEmoji);
4346
});
4447

45-
test('choices are rendered with emojis', (t) => {
48+
test('choices are rendered with emojis (default)', (t) => {
4649
const sgc = getConfig(path.join(fixtures, '.sgcrc'));
47-
48-
sgc.emojies = true;
49-
5050
const choicesList = choices(sgc);
5151

5252
t.deepEqual(choicesList, withEmoji);

0 commit comments

Comments
 (0)