.eslintcache
14.9 KB
[{"/Users/user/Desktop/movie-recommendation-nodejs/front/src/index.js":"1","/Users/user/Desktop/movie-recommendation-nodejs/front/src/reportWebVitals.js":"2","/Users/user/Desktop/movie-recommendation-nodejs/front/src/Requests.js":"3","/Users/user/Desktop/movie-recommendation-nodejs/front/src/axios.js":"4","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/App.js":"5","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Banner.js":"6","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Row.js":"7","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/SignIn.js":"8","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/SignUp.js":"9","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Main.js":"10","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Rating.js":"11","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Star.js":"12","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/StarRate.js":"13","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Movie.js":"14"},{"size":513,"mtime":1608011778376,"results":"15","hashOfConfig":"16"},{"size":362,"mtime":1607964619932,"results":"17","hashOfConfig":"16"},{"size":762,"mtime":1608146702423,"results":"18","hashOfConfig":"16"},{"size":133,"mtime":1607964619931,"results":"19","hashOfConfig":"16"},{"size":884,"mtime":1608044912355,"results":"20","hashOfConfig":"16"},{"size":1513,"mtime":1608040441171,"results":"21","hashOfConfig":"16"},{"size":2151,"mtime":1608146935004,"results":"22","hashOfConfig":"16"},{"size":2979,"mtime":1608144706263,"results":"23","hashOfConfig":"16"},{"size":4635,"mtime":1608039005129,"results":"24","hashOfConfig":"16"},{"size":744,"mtime":1608146829270,"results":"25","hashOfConfig":"16"},{"size":169,"mtime":1608056874577,"results":"26","hashOfConfig":"16"},{"size":1309,"mtime":1608058242287,"results":"27","hashOfConfig":"16"},{"size":2059,"mtime":1608057839195,"results":"28","hashOfConfig":"16"},{"size":3950,"mtime":1608144319332,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"y26k77",{"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":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":1,"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":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"58","usedDeprecatedRules":"59"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"62","usedDeprecatedRules":"32"},"/Users/user/Desktop/movie-recommendation-nodejs/front/src/index.js",[],["63","64"],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/reportWebVitals.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/Requests.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/axios.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/App.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Banner.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Row.js",["65"],"import React, {useState, useEffect} from 'react';\nimport YouTube from 'react-youtube';\nimport axios from '../axios';\nimport '../styles/Row.css';\nimport movieTrailer from 'movie-trailer'\n\nconst base_url = \"https://image.tmdb.org/t/p/original/\";\n\nfunction Row({title, fetchUrl, isLargeRow}){\n const [movies, setMovies] = useState([]);\n const [trailerUrl, setTrailerUrl] = useState();\n \n useEffect(() => {\n async function fetchData(){\n var page = String(Math.floor(Math.random() * 10) + 1)\n fetchUrl = fetchUrl + (isLargeRow ? page : \"\");\n console.log(fetchUrl);\n const request = await axios.get(fetchUrl);\n setMovies(request.data.results);\n return request;\n }\n fetchData();\n }, [fetchUrl])\n\n const opts = {\n height: \"390\",\n width: \"100%\",\n playerVars:{\n autoplay:1,\n },\n }\n\n const handleClick = (movie) => {\n movieTrailer(movie?.name || movie?.title || movie?.original_title)\n .then((url) => {\n console.log(url);\n const urlParams = new URLSearchParams(new URL(url).search);\n if(trailerUrl === urlParams.get('v')){\n setTrailerUrl(''); \n }else{\n setTrailerUrl(urlParams.get('v'));\n }\n })\n .catch((error) => console.log(error));\n }\n\n return(\n <div className='row'>\n <div style={{marginLeft:25}}>\n <h1>{title}</h1>\n </div>\n \n <div className='row_posters'>\n\n {movies.map(movie => (\n <img\n key={movie.id}\n onClick={() => handleClick(movie)}\n className={`row_poster ${isLargeRow && 'row_posterLarge'}`}\n src={`${base_url}${isLargeRow ? movie.poster_path : movie.poster_path}`} \n alt={movie.name}\n />\n ))}\n </div>\n {trailerUrl && <YouTube videoId={trailerUrl} opts={opts}/>}\n </div>\n )\n}\n\nexport default Row;","/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/SignIn.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/SignUp.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Main.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Rating.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Star.js",[],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/StarRate.js",["66"],"import React from 'react';\nimport Reset from '../images/reset.svg';\nimport '../styles/StarRate.css';\n\nfunction StarRate(props) {\n const _resetRating = (e) => {\n if(e.type === \"mouseleave\" || e.type === \"onTouchEnd\"){ \n props.onChange(props.cacheIdx, props.cacheRating);\n }else if(e.type === \"click\"){\n props.onChange(0,0);\n } \n }\n\n const _makeStars = () => {\n let stars = [];\n for(let i = 0; i < 10; i+=2){\n let starClass = \"star__rate\";\n \n if(props.rating !== 0){\n if (i <= props.idx) { \n if(props.idx === i && props.rating % 2 !== 0){\n starClass += ' is-half-selected';\n }else{\n starClass += ' is-selected';\n }\n }\n }else if(props.cacheRating !== 0){\n if (i <= props.cacheIdx) { \n if(props.cacheIdx === i && props.cacheRating % 2 !== 0){\n starClass += ' is-half-selected';\n }else{\n starClass += ' is-selected';\n }\n }\n }\n\n stars.push(\n <label key={i} \n className={starClass} \n onClick={()=>{props.onChange(props.idx,props.rating, true)}}\n onMouseOver={(e)=>{props._mouseOver(e,i)}}\n onMouseMove={(e)=>{props._mouseOver(e,i)}}\n onMouseLeave={(e)=>{_resetRating(e)}} \n onTouchMove={(e)=>{props._mouseOver(e,i)}}\n onTouchStart={(e)=>{props._mouseOver(e,i)}}\n onTouchEnd={(e)=>{_resetRating(e)}}\n >\n </label>\n )\n }\n return stars;\n }\n\n\n return (\n <div className=\"starRate__wrap\">\n {_makeStars()}\n \n </div>\n )\n}\n\nexport default StarRate\n",["67","68"],"/Users/user/Desktop/movie-recommendation-nodejs/front/src/views/Movie.js",["69","70","71","72"],"import React, {useState, useEffect} from 'react'\nimport {CssBaseline, Typography, CardContent, AppBar, Button, Card, CardActions, CardMedia, Grid, Toolbar, makeStyles, Container} from '@material-ui/core';\nimport Star from './Star'\nimport axios from '../axios'\nimport Axios from 'axios'\nimport requests from '../Requests'\nimport {useHistory} from 'react-router-dom';\n\n\nconst base_url = \"https://image.tmdb.org/t/p/original/\";\nconst useStyles = makeStyles((theme) => ({\n icon: {\n marginRight: theme.spacing(2),\n },\n heroContent: {\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(8, 0, 6),\n },\n heroButtons: {\n marginTop: theme.spacing(4),\n },\n cardGrid: {\n paddingTop: theme.spacing(8),\n paddingBottom: theme.spacing(8),\n },\n card: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n },\n cardMedia: {\n /*paddingTop: '56.25%', // 16:9*/\n paddingTop:'80%',\n },\n cardContent: {\n flexGrow: 1,\n height:250\n },\n star_position: {\n marginLeft:theme.spacing(7)\n },\n }));\n \n\n \n\nfunction Movie() {\n const history = useHistory();\n const [Movies, setMovies] = useState([]);\n function truncate(str, n){\n return str?.length > n ? str.substr(0, n-1) + '...' : str;\n}\n\nconst buttonHandler = () => {\n console.log('click');\n Axios\n .get('http://localhost:3002/movies')\n .then(res => {\n console.log(res);\n history.push('/main');\n })\n .catch(err => console.log(err));\n}\n\n useEffect(() => {\n var temp = String(Math.floor(Math.random() * 10) + 1)\n async function fetchData(){\n const request = await axios.get(requests.fetchNowPlaying + temp); \n setMovies(request.data.results);\n return request;\n }\n fetchData();\n },[])\n \n const classes = useStyles();\n return (\n <main>\n {/* Hero unit */}\n <div className={classes.heroContent}>\n <Container maxWidth=\"sm\">\n <Typography component=\"h1\" variant=\"h2\" align=\"center\" color=\"textPrimary\" gutterBottom >\n 영화 평점\n </Typography>\n <Typography variant=\"h5\" align=\"center\" color=\"textSecondary\" paragraph>\n 원하는 만큼 영화를 평가하세요<br/>\n 평가가 많을수록 취향에 꼭 맞는 영화를 추천해드려요!\n </Typography>\n <div className={classes.heroButtons}>\n <Grid container spacing={1} justify=\"center\">\n <Grid item>\n <Button variant=\"contained\" color=\"primary\" onClick={buttonHandler}>\n 영화 추천 받기\n </Button>\n </Grid>\n </Grid>\n </div>\n </Container>\n </div>\n <Container className={classes.cardGrid} maxWidth=\"md\">\n {/* End hero unit */}\n <Grid container spacing={4}>\n {Movies.map((Movie) => (\n <Grid item key={Movie} xs={12} sm={6} md={4}>\n <Card className={classes.card}>\n <CardMedia\n className={classes.cardMedia}\n image={`${base_url}${Movie.poster_path}`}\n title=\"Image title\"\n />\n <CardContent className={classes.cardContent}>\n <Typography gutterBottom variant=\"h5\" component=\"h2\">\n {Movie?.title || Movie?.name || Movie?.original_name}\n </Typography>\n <Typography>\n {truncate(Movie.overview, 100)}\n </Typography>\n </CardContent>\n <div className={classes.star_position}>\n <Star/>\n </div>\n </Card>\n </Grid>\n ))}\n </Grid>\n </Container>\n </main>\n )\n}\n\nexport default Movie\n",{"ruleId":"73","replacedBy":"74"},{"ruleId":"75","replacedBy":"76"},{"ruleId":"77","severity":1,"message":"78","line":16,"column":24,"nodeType":"79","endLine":16,"endColumn":59},{"ruleId":"80","severity":1,"message":"81","line":2,"column":8,"nodeType":"82","messageId":"83","endLine":2,"endColumn":13},{"ruleId":"73","replacedBy":"84"},{"ruleId":"75","replacedBy":"85"},{"ruleId":"80","severity":1,"message":"86","line":2,"column":9,"nodeType":"82","messageId":"83","endLine":2,"endColumn":20},{"ruleId":"80","severity":1,"message":"87","line":2,"column":47,"nodeType":"82","messageId":"83","endLine":2,"endColumn":53},{"ruleId":"80","severity":1,"message":"88","line":2,"column":69,"nodeType":"82","messageId":"83","endLine":2,"endColumn":80},{"ruleId":"80","severity":1,"message":"89","line":2,"column":99,"nodeType":"82","messageId":"83","endLine":2,"endColumn":106},"no-native-reassign",["90"],"no-negated-in-lhs",["91"],"react-hooks/exhaustive-deps","Assignments to the 'fetchUrl' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.","BinaryExpression","no-unused-vars","'Reset' is defined but never used.","Identifier","unusedVar",["90"],["91"],"'CssBaseline' is defined but never used.","'AppBar' is defined but never used.","'CardActions' is defined but never used.","'Toolbar' is defined but never used.","no-global-assign","no-unsafe-negation"]