Skip to content

Commit bd8d9e0

Browse files
committed
ADD travis, eslint
1 parent bbb2bf4 commit bd8d9e0

31 files changed

+171
-188
lines changed

app/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ import SongsView from './views/songs/SongsView';
1717
import AuthService from './services/AuthService';
1818

1919
export default class App extends React.Component<{}, {}> {
20-
constructor() {
20+
public constructor() {
2121
super();
2222
}
2323

24-
getFirstPage() {
24+
public getFirstPage() {
2525
return AuthService.isAuth() ? '/home' : '/login';
2626
}
2727

28-
requireAuth(next: RouterState, replace: Function) {
28+
public requireAuth(next: RouterState, replace: Function) {
2929
if (!AuthService.isAuth()) {
3030
replace({
3131
pathname: '/',
@@ -34,7 +34,7 @@ export default class App extends React.Component<{}, {}> {
3434
}
3535
}
3636

37-
render() {
37+
public render() {
3838
return (
3939
<Router history={browserHistory}>
4040
<Route path="/">

app/components/navbar/Navbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import {Link} from 'react-router';
33
import AuthService from '../../services/AuthService';
44

55
export default class Navbar extends React.Component<{}, {}> {
6-
logout() {
6+
public logout() {
77
AuthService.removeAuth();
88
}
99

10-
render() {
10+
public render() {
1111
return (
1212
<div className="navbar">
1313
<div className="navbar-logo">

app/components/player/Player.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22

33
export default class Player extends React.Component<{}, {}> {
4-
render() {
4+
public render() {
55
return (
66
<div className="player">
77
Player

app/components/song/Song.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import * as React from 'react';
2-
import {SongModel} from '../../models/SongModel';
2+
import {ISongModel} from '../../models/ISongModel';
33

44
export interface ISongProps {
5-
model: SongModel;
5+
model: ISongModel;
66
className: string;
77
}
88

99
export default class Song extends React.Component<ISongProps, {}> {
10-
render() {
10+
public render() {
1111
return (
1212
<div className={`${this.props.className} song`}>
1313
{this.props.model.id}. {this.props.model.name}

app/mocks/Repository.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,55 @@ import {albums} from './Albums';
44
import {songs} from './Songs';
55

66
export default class Repository {
7-
static findAllArtists() {
7+
public static findAllArtists() {
88
return Promise.resolve({
99
artists
1010
});
1111
}
1212

13-
static findAllAlbums() {
13+
public static findAllAlbums() {
1414
return Promise.resolve({
1515
albums
1616
});
1717
}
1818

19-
static findAllSongs() {
19+
public static findAllSongs() {
2020
return Promise.resolve({
2121
songs
2222
});
2323
}
2424

25-
static findSongsByAlbum(albumId: number) {
25+
public static findSongsByAlbum(albumId: number) {
2626
return Promise.resolve({
2727
songs: songs.filter((song) => {
2828
return song.albumId === albumId;
2929
})
3030
});
3131
}
3232

33-
static findAlbumsByArtist(artistId: number) {
33+
public static findAlbumsByArtist(artistId: number) {
3434
return Promise.resolve({
3535
albums: albums.filter((album) => {
3636
return album.artistId === artistId;
3737
})
3838
});
3939
}
4040

41-
static findSongsByArtist(artistId: number) {
41+
public static findSongsByArtist(artistId: number) {
4242
return Promise.resolve({
4343
songs: songs.filter((song) => {
4444
return song.artistId === artistId;
4545
})
4646
});
4747
}
4848

49-
static findArtistById(id: number) {
49+
public static findArtistById(id: number) {
5050
return Promise.resolve(artists.filter((artist) => {
5151
return artist.id === id;
5252
})[0]);
5353
}
5454

55-
static findAlbumById(id: number) {
55+
public static findAlbumById(id: number) {
5656
return Promise.resolve(albums.filter((album) => {
5757
return album.id === id;
5858
})[0]);

app/models/AlbumModel.ts renamed to app/models/IAlbumModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface AlbumModel {
1+
export interface IAlbumModel {
22
id: number;
33
name: string;
44
image: string;

app/models/ArtistModel.ts renamed to app/models/IArtistModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface ArtistModel {
1+
export interface IArtistModel {
22
id: number;
33
name: string;
44
image: string;

app/models/SongModel.ts renamed to app/models/ISongModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export interface SongModel {
1+
export interface ISongModel {
22
id: number;
33
name: string;
44
albumId?: number;

app/models/responses/AlbumsResponse.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/models/responses/ArtistsResponse.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)