-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 16.8 KB
/
.eslintcache
1
[{"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/index.js":"1","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/reportWebVitals.js":"2","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/App.js":"3","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Login.js":"4","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/spotify.js":"5","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Player.js":"6","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/DataLayer.js":"7","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/reducer.js":"8","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Sidebar.js":"9","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Body.js":"10","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Footer.js":"11","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/SidebarOption.js":"12","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Header.js":"13","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/SongRow.js":"14"},{"size":726,"mtime":1607927123684,"results":"15","hashOfConfig":"16"},{"size":362,"mtime":1607796008344,"results":"17","hashOfConfig":"16"},{"size":1539,"mtime":1608073229923,"results":"18","hashOfConfig":"16"},{"size":450,"mtime":1607797931700,"results":"19","hashOfConfig":"16"},{"size":940,"mtime":1607903861093,"results":"20","hashOfConfig":"16"},{"size":433,"mtime":1608086761219,"results":"21","hashOfConfig":"16"},{"size":386,"mtime":1607927218180,"results":"22","hashOfConfig":"16"},{"size":1291,"mtime":1608077066262,"results":"23","hashOfConfig":"16"},{"size":1174,"mtime":1607989346732,"results":"24","hashOfConfig":"16"},{"size":2439,"mtime":1608086874481,"results":"25","hashOfConfig":"16"},{"size":3988,"mtime":1608084819152,"results":"26","hashOfConfig":"16"},{"size":320,"mtime":1607987872934,"results":"27","hashOfConfig":"16"},{"size":1219,"mtime":1608057166679,"results":"28","hashOfConfig":"16"},{"size":599,"mtime":1608086857820,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"i79nag",{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"37","usedDeprecatedRules":"32"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"48","usedDeprecatedRules":"32"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"51","usedDeprecatedRules":"32"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"56","usedDeprecatedRules":"32"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"61","usedDeprecatedRules":"32"},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/index.js",[],["64","65"],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/reportWebVitals.js",[],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/App.js",["66","67","68"],"import React, { useEffect, useState } from \"react\";\nimport logo from './logo.svg';\nimport './App.css';\nimport Login from \"./Login\"\nimport { getTokenFromUrl } from \"./spotify\";\nimport SpotifyWebApi from 'spotify-web-api-js'\nimport Player from './Player'\nimport { useDataLayerValue } from './DataLayer'\n\nconst spotify = new SpotifyWebApi();\n\nfunction App() {\n\n const [{ user, token }, dispatch] = useDataLayerValue();\n\n // Run code based on a given condition\n useEffect(() => {\n const hash = getTokenFromUrl();\n window.location.hash = \"\";\n const _token = hash.access_token;\n\n if (_token) {\n\n dispatch({\n type:'SET_TOKEN',\n token:_token\n })\n\n // get token\n spotify.setAccessToken(_token) //give spotify api access token\n\n // get user\n spotify.getMe().then(user => {\n // console.log('🧔', user )\n\n dispatch({\n type: 'SET_USER',\n user: user\n });\n });\n\n // get playlists\n spotify.getUserPlaylists().then((playlists) => {\n dispatch({\n type: \"SET_PLAYLISTS\",\n playlists: playlists\n })\n })\n\n spotify.getPlaylist('37i9dQZEVXcDKK9F1D2mc2')\n .then(response =>\n dispatch({\n type: \"SET_DISCOVER_WEEKLY\",\n discover_weekly: response\n }))\n\n }\n\n\n }, []);\n\n console.log(\"User >>\", user)\n console.log(\"I have a token >> \", token)\n\n return <div className=\"App\">{\n\n token ? <Player spotify={spotify} /> : <Login />\n\n }\n </div>;\n}\n\nexport default App;\n","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Login.js",[],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/spotify.js",[],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Player.js",[],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/DataLayer.js",[],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/reducer.js",["69"],"import { findAllByDisplayValue } from \"@testing-library/react\";\n\nexport const initialState = {\n user: null,\n playlists: [],\n spotify: null,\n discover_weekly: null,\n top_artists: null,\n playing: false,\n item: null,\n};\n\nconst reducer = (state, action) => {\n console.log(action);\n switch (action.type) {\n case \"SET_USER\":\n return {\n ...state,\n user: action.user,\n };\n\n case \"SET_PLAYING\":\n return {\n ...state,\n playing: action.playing,\n };\n\n case \"SET_ITEM\":\n return {\n ...state,\n item: action.item,\n };\n\n case \"SET_DISCOVER_WEEKLY\":\n return {\n ...state,\n discover_weekly: action.discover_weekly,\n };\n\n case \"SET_TOP_ARTISTS\":\n return {\n ...state,\n top_artists: action.top_artists,\n };\n\n case \"SET_TOKEN\":\n return {\n ...state,\n token: action.token,\n };\n\n case \"SET_SPOTIFY\":\n return {\n ...state,\n spotify: action.spotify,\n };\n\n case \"SET_PLAYLISTS\":\n return {\n ...state,\n playlists: action.playlists,\n };\n\n case \"SET_VOLUME\":\n return {\n ...state,\n volume: action.volume\n }\n\n default:\n return state;\n }\n};\n\nexport default reducer;","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Sidebar.js",["70"],"import React from 'react'\nimport './Sidebar.css'\nimport SidebarOption from './SidebarOption'\nimport HomeIcon from '@material-ui/icons/Home';\nimport SearchIcon from '@material-ui/icons/Search';\nimport LibraryMusicIcon from '@material-ui/icons/LibraryMusic';\nimport { useDataLayerValue } from './DataLayer';\n\nfunction Sidebar() {\n const [{ playlists }, dispatch] = useDataLayerValue();\n\n return (\n <div className=\"sidebar\">\n <img\n className=\"sidebar__logo\"\n src=\"https://getheavy.com/wp-content/uploads/2019/12/spotify2019-830x350.jpg\"\n alt=\"\"\n />\n\n <SidebarOption title=\"Home\" Icon={HomeIcon}/>\n <SidebarOption title=\"Search\" Icon={SearchIcon}/>\n <SidebarOption title=\"Your Library\" Icon={LibraryMusicIcon} />\n\n <br />\n <strong className=\"sidebar__title\"> PLAYLISTS</strong>\n <hr />\n\n <SidebarOption title=\"Your Top Songs 2020\" />\n <SidebarOption title=\"lofi hip hop\" />\n <SidebarOption title=\"Bangers\" />\n\n {playlists?.items?.map(playlist => (\n <SidebarOption title={playlist.name}/>\n ))}\n\n </div>\n );\n}\n\nexport default Sidebar\n","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Body.js",[],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Footer.js",["71","72","73","74"],"import React, {useEffect, useState} from \"react\";\nimport \"./Footer.css\";\nimport { useDataLayerValue } from './DataLayer'\nimport PlayCircleOutlineIcon from \"@material-ui/icons/PlayCircleOutline\";\nimport PauseCircleOutlineIcon from '@material-ui/icons/PauseCircleOutline';\nimport SkipPreviousIcon from \"@material-ui/icons/SkipPrevious\";\nimport SkipNextIcon from \"@material-ui/icons/SkipNext\";\nimport ShuffleIcon from \"@material-ui/icons/Shuffle\";\nimport RepeatIcon from \"@material-ui/icons/Repeat\";\nimport FavoriteBorderIcon from \"@material-ui/icons/FavoriteBorder\";\nimport PlaylistPlayIcon from \"@material-ui/icons/PlaylistPlay\";\nimport VolumeDownIcon from \"@material-ui/icons/VolumeDown\";\nimport { AccordionActions, Grid, Slider } from \"@material-ui/core\";\n\nfunction Footer({ spotify }) {\n const [{ token, item, playing }, dispatch] = useDataLayerValue();\n\n useEffect(() => {\n spotify.getMyCurrentPlaybackState().then((r) => {\n console.log(r);\n\n dispatch({\n type: \"SET_PLAYING\",\n playing: r.is_playing,\n });\n\n dispatch({\n type: \"SET_ITEM\",\n item: r.item,\n });\n });\n }, [spotify]);\n\n const handlePlayPause = () => {\n if (playing) {\n spotify.pause();\n dispatch({\n type: \"SET_PLAYING\",\n playing: false,\n });\n } else {\n spotify.play();\n dispatch({\n type: \"SET_PLAYING\",\n playing: true,\n });\n }\n };\n\n const skipNext = () => {\n spotify.skipToNext();\n spotify.getMyCurrentPlayingTrack().then((r) => {\n dispatch({\n type: \"SET_ITEM\",\n item: r.item,\n });\n dispatch({\n type: \"SET_PLAYING\",\n playing: true,\n });\n });\n };\n\n const skipPrevious = () => {\n spotify.skipToPrevious();\n spotify.getMyCurrentPlayingTrack().then((r) => {\n dispatch({\n type: \"SET_ITEM\",\n item: r.item,\n });\n dispatch({\n type: \"SET_PLAYING\",\n playing: true,\n });\n });\n };\n\n const setVolume = (newVolume) => {\n spotify.setVolume(newVolume/100).then((r) => {\n dispatch({\n type:\"SET_VOLUME\",\n volume: newVolume/100\n })\n })\n }\n\n return (\n <div className=\"footer\">\n <div className=\"footer__left\">\n <img\n className=\"footer__albumLogo\"\n src={item?.album.images[0].url}\n alt={item?.name}\n />\n\n {item ? (\n <div className=\"footer__songInfo\">\n <div className=\"footer__songName\">\n <h4>{item.name}</h4>\n <FavoriteBorderIcon fontSize=\"small\" className=\"footer__like\" />\n </div>\n <p>{item.artists.map((artist) => artist.name).join(\", \")}</p>\n </div>\n ) : (\n <div className=\"footer__songInfo\">\n <h4>No song is playing</h4>\n <p>...</p>\n </div>\n )}\n\n </div>\n\n <div className=\"footer__center\">\n <ShuffleIcon className=\"footer__green\" />\n <SkipPreviousIcon onClick={skipPrevious} className=\"footer__icon\" />\n\n {playing ? (\n <PauseCircleOutlineIcon\n onClick={handlePlayPause}\n fontSize=\"large\"\n className=\"footer__icon\"\n />\n ) : (\n <PlayCircleOutlineIcon\n onClick={handlePlayPause}\n fontSize=\"large\"\n className=\"footer__icon\"\n />\n )}\n\n <SkipNextIcon onclick={skipNext} className=\"footer__icon\" />\n\n <RepeatIcon className=\"footer__green\" />\n </div>\n\n <div className=\"footer__right\">\n <Grid container spacing={2}>\n <Grid item>\n <PlaylistPlayIcon className=\"footer__icon\" />\n </Grid>\n <Grid item>\n <VolumeDownIcon className=\"footer__icon\" />\n </Grid>\n <Grid item xs>\n <Slider onChange={setVolume} />\n </Grid>\n </Grid>\n </div>\n </div>\n );\n}\n\nexport default Footer;\n","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/SidebarOption.js",[],"/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/Header.js",["75"],"import React from 'react'\nimport './Header.css'\nimport SearchIcon from '@material-ui/icons/Search';\nimport { Avatar } from \"@material-ui/core\"\nimport { useDataLayerValue } from './DataLayer';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';\nimport ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos';\n\nfunction Header() {\n const [{ user }, dispatch] = useDataLayerValue()\n\n return (\n <div className='header'>\n <div className='header__left'>\n <ArrowBackIosIcon className=\"header__icon\"/>\n <ArrowForwardIosIcon className=\"header__icon\"/>\n\n <div className=\"header__search\">\n <SearchIcon />\n <input\n placeholder=\"Search\"\n type=\"text\"\n />\n </div>\n </div>\n\n <div className='header__right'>\n <Avatar src={user?.images[0]?.url} alt={user?.display_name} />\n <h4>{user?.display_name}</h4>\n <ExpandMoreIcon className=\"header__icon\"/>\n </div>\n </div>\n )\n}\n\nexport default Header\n","/Users/vinhnguyen/Desktop/code/spotify-clone/spotify-clone/src/SongRow.js",[],{"ruleId":"76","replacedBy":"77"},{"ruleId":"78","replacedBy":"79"},{"ruleId":"80","severity":1,"message":"81","line":1,"column":28,"nodeType":"82","messageId":"83","endLine":1,"endColumn":36},{"ruleId":"80","severity":1,"message":"84","line":2,"column":8,"nodeType":"82","messageId":"83","endLine":2,"endColumn":12},{"ruleId":"85","severity":1,"message":"86","line":60,"column":6,"nodeType":"87","endLine":60,"endColumn":8,"suggestions":"88"},{"ruleId":"80","severity":1,"message":"89","line":1,"column":10,"nodeType":"82","messageId":"83","endLine":1,"endColumn":31},{"ruleId":"80","severity":1,"message":"90","line":10,"column":27,"nodeType":"82","messageId":"83","endLine":10,"endColumn":35},{"ruleId":"80","severity":1,"message":"81","line":1,"column":27,"nodeType":"82","messageId":"83","endLine":1,"endColumn":35},{"ruleId":"80","severity":1,"message":"91","line":13,"column":10,"nodeType":"82","messageId":"83","endLine":13,"endColumn":26},{"ruleId":"80","severity":1,"message":"92","line":16,"column":12,"nodeType":"82","messageId":"83","endLine":16,"endColumn":17},{"ruleId":"85","severity":1,"message":"86","line":32,"column":6,"nodeType":"87","endLine":32,"endColumn":15,"suggestions":"93"},{"ruleId":"80","severity":1,"message":"90","line":11,"column":22,"nodeType":"82","messageId":"83","endLine":11,"endColumn":30},"no-native-reassign",["94"],"no-negated-in-lhs",["95"],"no-unused-vars","'useState' is defined but never used.","Identifier","unusedVar","'logo' is defined but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.","ArrayExpression",["96"],"'findAllByDisplayValue' is defined but never used.","'dispatch' is assigned a value but never used.","'AccordionActions' is defined but never used.","'token' is assigned a value but never used.",["97"],"no-global-assign","no-unsafe-negation",{"desc":"98","fix":"99"},{"desc":"100","fix":"101"},"Update the dependencies array to be: [dispatch]",{"range":"102","text":"103"},"Update the dependencies array to be: [dispatch, spotify]",{"range":"104","text":"105"},[1328,1330],"[dispatch]",[1131,1140],"[dispatch, spotify]"]