Skip to content

Commit

Permalink
Mention running lint rules, conform commit to lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rcsandell committed Dec 30, 2018
1 parent 97d877f commit cce6430
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ If you'd like to contribute a change to bowser, modify the files in `src/`, then
``` sh
$ npm install #build
$ npm test #run tests
$ npm run lint #check lint rules
```

### Adding tests
Expand Down
30 changes: 14 additions & 16 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,22 @@ class Utils {
* @return {string} versionName
*/
static getAndroidVersionName(version) {
const v = version.split('.').splice(0, 2).map((s) => {
return parseInt(s, 10) || 0;
});
const v = version.split('.').splice(0, 2).map(s => parseInt(s, 10) || 0);
v.push(0);
if (v[0] === 1 && v[1] < 5) return undefined;
if (v[0] === 1 && v[1] < 6) return "Cupcake";
if (v[0] === 1 && v[1] >= 6) return "Donut";
if (v[0] === 2 && v[1] < 2) return "Eclair";
if (v[0] === 2 && v[1] === 2) return "Froyo";
if (v[0] === 2 && v[1] > 2) return "Gingerbread";
if (v[0] === 3) return "Honeycomb";
if (v[0] === 4 && v[1] < 1) return "Ice Cream Sandwich";
if (v[0] === 4 && v[1] < 4) return "Jelly Bean";
if (v[0] === 4 && v[1] >= 4) return "KitKat";
if (v[0] === 5) return "Lollipop";
if (v[0] === 6) return "Marshmallow";
if (v[0] === 7) return "Nougat";
if (v[0] === 8) return "Oreo";
if (v[0] === 1 && v[1] < 6) return 'Cupcake';
if (v[0] === 1 && v[1] >= 6) return 'Donut';
if (v[0] === 2 && v[1] < 2) return 'Eclair';
if (v[0] === 2 && v[1] === 2) return 'Froyo';
if (v[0] === 2 && v[1] > 2) return 'Gingerbread';
if (v[0] === 3) return 'Honeycomb';
if (v[0] === 4 && v[1] < 1) return 'Ice Cream Sandwich';
if (v[0] === 4 && v[1] < 4) return 'Jelly Bean';
if (v[0] === 4 && v[1] >= 4) return 'KitKat';
if (v[0] === 5) return 'Lollipop';
if (v[0] === 6) return 'Marshmallow';
if (v[0] === 7) return 'Nougat';
if (v[0] === 8) return 'Oreo';
return undefined;
}

Expand Down

0 comments on commit cce6430

Please sign in to comment.