-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 17.9 KB
/
.eslintcache
1
[{"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/index.js":"1","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/App.js":"2","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/reportWebVitals.js":"3","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/Home/index.js":"4","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/GuestHome/index.js":"5","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/Home/Home.js":"6","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/GuestHome/GuestHome.js":"7","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/util.js":"8","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FooterComponent/FooterComponent.js":"9","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FooterComponent/index.js":"10","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackModal/index.js":"11","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackModal/FeedbackModal.js":"12","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackPage/index.js":"13","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackPage/FeedbackPage.js":"14"},{"size":672,"mtime":1614749131690,"results":"15","hashOfConfig":"16"},{"size":1042,"mtime":1616126341840,"results":"17","hashOfConfig":"16"},{"size":362,"mtime":1609565627382,"results":"18","hashOfConfig":"16"},{"size":45,"mtime":1609568096052,"results":"19","hashOfConfig":"16"},{"size":60,"mtime":1609615551780,"results":"20","hashOfConfig":"16"},{"size":31314,"mtime":1622188616824,"results":"21","hashOfConfig":"16"},{"size":8448,"mtime":1622187479767,"results":"22","hashOfConfig":"16"},{"size":680,"mtime":1616126094465,"results":"23","hashOfConfig":"16"},{"size":1357,"mtime":1614749897450,"results":"24","hashOfConfig":"16"},{"size":78,"mtime":1610357099679,"results":"25","hashOfConfig":"16"},{"size":72,"mtime":1616123793925,"results":"26","hashOfConfig":"16"},{"size":1587,"mtime":1616126094465,"results":"27","hashOfConfig":"16"},{"size":69,"mtime":1616126174383,"results":"28","hashOfConfig":"16"},{"size":1632,"mtime":1616126860257,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"13l9rna",{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"43","messages":"44","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"45","usedDeprecatedRules":"32"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"50","usedDeprecatedRules":"32"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/index.js",[],["61","62"],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/App.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/reportWebVitals.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/Home/index.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/GuestHome/index.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/Home/Home.js",["63","64","65","66","67"],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/GuestHome/GuestHome.js",["68","69"],"import { \n PageHeader, \n Button, \n notification, \n List, \n Table,\n Spin\n} from 'antd'\nimport Input from 'muicss/lib/react/input'\nimport { \n header, \n cardExtras, \n searchBox, \n} from './GuestHome.module.css'\nimport { albumArt, requestsTable, welcomeContainer, logo } from '../Home/Home.module.css'\nimport { useEffect, useState } from 'react'\nimport { useParams } from 'react-router-dom'\nimport axios from 'axios'\nimport { CheckCircleTwoTone, PlusOutlined, LoadingOutlined } from '@ant-design/icons'\nimport { getURL, logoUrl } from '../util'\nimport { isMobile } from 'react-device-detect'\nimport 'antd/dist/antd.css'\nimport './mui.css'\nimport FooterComponent from '../FooterComponent/FooterComponent'\nimport FeedbackModal from '../FeedbackModal'\nimport _ from 'lodash'\n\nconst joinArtists = artistsRaw => {\n let result = ''\n for (let i = 0; i < artistsRaw.length; i++) {\n result += artistsRaw[i].name\n if (i < artistsRaw.length - 1) {\n result += ', '\n }\n }\n return result\n}\n\nconst GuestHome = () => {\n const [tracks, setTracks] = useState([])\n const [userName, setUserName] = useState('')\n const [requested, setRequested] = useState([])\n const [recentRequests, setRecentRequests] = useState([])\n const [currQuery, setQuery] = useState('')\n const [pageLoading, setPageLoading] = useState(true)\n const [requestsLoading, setRequestsLoading] = useState([])\n const [feedbackVisible, setFeedbackVisible] = useState(false)\n const { userId } = useParams()\n const albumArtIndex = 0\n useEffect(() => {\n document.title = 'Welcome to SongQ!'\n axios.post(`${getURL()}/guest-login`, {}, { withCredentials: true })\n .then(() => {\n axios.get(`${getURL()}/get-user-name?userId=${userId}`, { withCredentials: true })\n .then(response => {\n const { name } = response.data\n if (name) {\n setUserName(name)\n }\n })\n .catch(err => {\n console.log(err)\n })\n axios.get(`${getURL()}/get-recently-approved?userId=${userId}`, { withCredentials: true })\n .then(response => {\n const { requests } = response.data\n setRecentRequests(requests)\n })\n .catch(err => {\n console.log(err)\n })\n })\n .catch(err => {\n notification['error']({\n message: 'Server Error',\n description: 'Cannot connect to Spotify'\n })\n console.log(err)\n })\n .finally(() => {\n setPageLoading(false)\n })\n \n }, [])\n const onSearchChanged = query => {\n setQuery(query)\n if (query === '') {\n return\n }\n setPageLoading(true)\n axios.post(`${getURL()}/search-songs`, { q: query}, { \n withCredentials: true,\n })\n .then(response => {\n const { items } = response.data.results.tracks\n setTracks(items)\n })\n .catch(err => {\n console.log(err)\n })\n .finally(() => {\n setPageLoading(false)\n })\n }\n const handleSearchText = _.debounce(onSearchChanged, 500)\n const makeRequest = track => {\n requestsLoading.push(track.id)\n setRequestsLoading([...requestsLoading])\n axios.post(`${getURL()}/make-request`, {\n userId,\n songId: track.id,\n songName: track.songName,\n artists: track.artists,\n album: track.album,\n albumArt: track.albumArt\n }, {\n withCredentials: true\n })\n .then(() => {\n requested.push(track.id)\n setRequested([...requested])\n })\n .catch(err => {\n notification['error']({\n message: 'Could not make request',\n description: 'Error making request'\n })\n console.log(err)\n })\n .finally(() => {\n requestsLoading.splice(track.id, 1)\n setRequestsLoading([...requestsLoading])\n })\n }\n const generateData = () => {\n const toReturn = []\n if (currQuery === '') {\n for (let i = 0; i < recentRequests.length; i++) {\n const r = recentRequests[i]\n toReturn.push({\n key: `${i}`,\n track: {\n songName: r.songName,\n albumArt: r.albumArt,\n artists: r.artists\n }\n })\n }\n } else {\n for (let i = 0; i < tracks.length; i++) {\n const t = tracks[i]\n const songInfo = {\n songName: t.name,\n albumArt: t.album.images[albumArtIndex].url,\n artists: joinArtists(t.artists)\n }\n songInfo.id = t.id\n toReturn.push({\n key: `${i}`,\n track: songInfo,\n request: {\n id: t.id,\n album: t.album.name,\n ...songInfo\n }\n })\n }\n }\n return toReturn\n }\n const columns = [\n {\n title: 'Track',\n dataIndex: 'track',\n key: 'track',\n width: '70%',\n render: track => (\n <List.Item>\n <List.Item.Meta \n avatar={\n <img \n alt='album art' \n src={track.albumArt} \n className={albumArt}\n />}\n title={track.songName}\n description={track.artists}\n />\n </List.Item>\n ),\n }\n ]\n if (currQuery !== '') {\n columns.push({\n title: 'Request',\n dataIndex: 'request',\n key: 'request',\n width: '30%',\n render: track => (\n <Button \n className={cardExtras} \n style={{ marginBottom: '1rem', marginTop: '1rem', border: 'none'}} \n onClick={() => makeRequest(track)}\n disabled={requested.includes(track.id)}\n loading={requestsLoading.includes(track.id)}\n >\n {requestsLoading.includes(track.id) ? '' : (requested.includes(track.id) ? <CheckCircleTwoTone className={cardExtras} twoToneColor=\"#52c41a\"/> : <PlusOutlined />)}\n </Button>\n )\n })\n }\n return (\n <div>\n <PageHeader \n title={\n <div className={welcomeContainer}>\n <img className={logo} src={logoUrl} style={isMobile ? { width: '40%'} : {}}/>\n <span>{userName !== '' ? `${userName}'s queue` : `Welcome to the queue!`}</span>\n </div>}\n className={header}\n />\n <Spin spinning={pageLoading} indicator={<LoadingOutlined spin />}>\n <div>\n <Input\n label='Search for songs'\n onChange={e => handleSearchText(e.target.value)}\n className={searchBox}\n floatingLabel\n />\n <h2 style={{ textAlign: 'center', fontVariant: 'tabular-nums', fontWeight: 'bold'}}>\n {currQuery === '' ? 'Recently Played' : 'Search Results'}\n </h2>\n <Table columns={columns} dataSource={generateData()} className={requestsTable} />\n </div>\n </Spin>\n <FeedbackModal feedbackVisible={feedbackVisible} hideFeedback={() => setFeedbackVisible(false)}/>\n <FooterComponent transparentBackground showFeedback={() => setFeedbackVisible(true)}/>\n </div>\n )\n}\n\n\n\nexport default GuestHome","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/util.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FooterComponent/FooterComponent.js",["70"],"import { Layout } from 'antd'\nimport { \n footer,\n footerElem,\n footerMobile\n} from './Footer.module.css'\nimport { isMobile } from 'react-device-detect'\n\nconst { Footer } = Layout\n\nconst FooterComponent = props => {\n const footerStyle = props.transparentBackground ? { background: 'none' } : {}\n const aStyle = props.transparentBackground ? { color: 'black' } : {}\n return(\n <Footer className={isMobile ? footerMobile : footer} style={footerStyle}>\n <a \n href='/terms-and-conditions.html' \n target='_blank' \n className={footerElem} \n style={{ \n marginLeft: '1rem',\n ...aStyle\n }}\n >\n Terms and Conditions\n </a>\n <a \n href='/privacy-policy.html' \n target='_blank' \n className={footerElem}\n style={{ \n marginLeft: '1rem',\n ...aStyle\n }}\n >\n Privacy Policy\n </a>\n <a\n onClick={() => props.showFeedback()}\n className={footerElem}\n style={aStyle}\n >\n Feedback\n </a>\n </Footer>\n )\n}\n\nexport default FooterComponent","/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FooterComponent/index.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackModal/index.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackModal/FeedbackModal.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackPage/index.js",[],"/Users/gautamjethwani/Documents/SongQ/songq-ui/src/FeedbackPage/FeedbackPage.js",[],{"ruleId":"71","replacedBy":"72"},{"ruleId":"73","replacedBy":"74"},{"ruleId":"75","severity":1,"message":"76","line":80,"column":12,"nodeType":"77","messageId":"78","endLine":80,"endColumn":27},{"ruleId":"79","severity":1,"message":"80","line":199,"column":8,"nodeType":"81","endLine":199,"endColumn":23,"suggestions":"82"},{"ruleId":"79","severity":1,"message":"83","line":212,"column":9,"nodeType":"81","endLine":212,"endColumn":36,"suggestions":"84"},{"ruleId":"79","severity":1,"message":"85","line":216,"column":8,"nodeType":"81","endLine":216,"endColumn":17,"suggestions":"86"},{"ruleId":"87","severity":1,"message":"88","line":711,"column":25,"nodeType":"89","endLine":711,"endColumn":102},{"ruleId":"79","severity":1,"message":"90","line":84,"column":8,"nodeType":"81","endLine":84,"endColumn":10,"suggestions":"91"},{"ruleId":"87","severity":1,"message":"88","line":217,"column":21,"nodeType":"89","endLine":217,"endColumn":98},{"ruleId":"92","severity":1,"message":"93","line":38,"column":13,"nodeType":"89","endLine":42,"endColumn":14},"no-native-reassign",["94"],"no-negated-in-lhs",["95"],"no-unused-vars","'emailPreference' is assigned a value but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'approveRejectAll', 'autoAccept', 'cookies', 'getSortComparator', and 'setCookie'. Either include them or remove the dependency array.","ArrayExpression",["96"],"React Hook useEffect has a missing dependency: 'menuVisible'. Either include it or remove the dependency array.",["97"],"React Hook useEffect has a missing dependency: 'sortBy'. Either include it or remove the dependency array.",["98"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","React Hook useEffect has a missing dependency: 'userId'. Either include it or remove the dependency array.",["99"],"jsx-a11y/anchor-is-valid","The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","no-global-assign","no-unsafe-negation",{"desc":"100","fix":"101"},{"desc":"102","fix":"103"},{"desc":"104","fix":"105"},{"desc":"106","fix":"107"},"Update the dependencies array to be: [approveRejectAll, autoAccept, cookies, getSortComparator, initialRender, setCookie]",{"range":"108","text":"109"},"Update the dependencies array to be: [currTourStep, menuVisible, tourVisible]",{"range":"110","text":"111"},"Update the dependencies array to be: [sortBy, sortKey]",{"range":"112","text":"113"},"Update the dependencies array to be: [userId]",{"range":"114","text":"115"},[7740,7755],"[approveRejectAll, autoAccept, cookies, getSortComparator, initialRender, setCookie]",[8114,8141],"[currTourStep, menuVisible, tourVisible]",[8234,8243],"[sortBy, sortKey]",[2903,2905],"[userId]"]