Skip to content

Commit

Permalink
Update eslint switch operator indent formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBurunkov committed Dec 10, 2020
1 parent 21267e7 commit 04e0ba1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"extends": "eslint:recommended",
"rules": {
"indent": ["error", 2],
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": [
"error",
"unix"
Expand Down
48 changes: 24 additions & 24 deletions src/song.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@ module.exports = class Song {
let key = keyValue[0].trim();
let value = keyValue[1].trim();
switch(key) {
case FIELD_FILE:
info.file = value;
break;
case FIELD_LAST_MODIFIED:
info.lastModified = new Date(value);
break;
case FIELD_TIME:
info.time = value;
break;
case FIELD_ARTIST:
info.artist = value;
break;
case FIELD_TITLE:
info.title = value;
break;
case FIELD_TRACK:
info.track = value;
break;
case FIELD_DATE:
info.date = value;
break;
case FIELD_GENRE:
info.genre = value;
break;
case FIELD_FILE:
info.file = value;
break;
case FIELD_LAST_MODIFIED:
info.lastModified = new Date(value);
break;
case FIELD_TIME:
info.time = value;
break;
case FIELD_ARTIST:
info.artist = value;
break;
case FIELD_TITLE:
info.title = value;
break;
case FIELD_TRACK:
info.track = value;
break;
case FIELD_DATE:
info.date = value;
break;
case FIELD_GENRE:
info.genre = value;
break;
}
}
return new Song(info);
Expand Down

0 comments on commit 04e0ba1

Please # to comment.