-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 7.64 KB
/
.eslintcache
1
[{"/Users/daniel.siwiec/workspace/slalom/profiles/src/index.js":"1","/Users/daniel.siwiec/workspace/slalom/profiles/src/serviceWorker.js":"2","/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/profile.js":"3","/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/consts.js":"4","/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/section.js":"5","/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/presentation.js":"6","/Users/daniel.siwiec/workspace/slalom/profiles/src/Main.js":"7","/Users/daniel.siwiec/workspace/slalom/profiles/src/Instructions.js":"8"},{"size":241,"mtime":1611854685066,"results":"9","hashOfConfig":"10"},{"size":4951,"mtime":1611811688806,"results":"11","hashOfConfig":"10"},{"size":2451,"mtime":1612427996654,"results":"12","hashOfConfig":"10"},{"size":177,"mtime":1612313605527,"results":"13","hashOfConfig":"10"},{"size":936,"mtime":1612427736950,"results":"14","hashOfConfig":"10"},{"size":540,"mtime":1612427750737,"results":"15","hashOfConfig":"10"},{"size":2675,"mtime":1611960909272,"results":"16","hashOfConfig":"10"},{"size":666,"mtime":1612289731515,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},"mpn4qq",{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"33","usedDeprecatedRules":"20"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"36","usedDeprecatedRules":"20"},"/Users/daniel.siwiec/workspace/slalom/profiles/src/index.js",[],["37","38"],"/Users/daniel.siwiec/workspace/slalom/profiles/src/serviceWorker.js",[],"/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/profile.js",[],"/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/consts.js",[],"/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/section.js",[],"/Users/daniel.siwiec/workspace/slalom/profiles/src/pptx/presentation.js",[],"/Users/daniel.siwiec/workspace/slalom/profiles/src/Main.js",["39","40"],"import React from 'react'\nimport jsYaml from 'js-yaml'\nimport { FileDrop } from 'react-file-drop'\nimport Container from '@material-ui/core/Container'\nimport Grid from '@material-ui/core/Grid'\nimport './Main.css'\nimport Instructions from './Instructions'\nimport Profile from './pptx/profile'\nimport CloudDownloadIcon from '@material-ui/icons/CloudDownload'\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle'\n\nclass Main extends React.Component {\n\n\tconstructor(props) {\n\t\tsuper(props)\n\t\tthis.state = {}\n\t}\n\n\tuploadPhoto = files => {\n\t\tconst reader = new FileReader()\n\n\t\treader.addEventListener('load', () => {\n\t\t\tthis.setState({ photo: reader.result })\n\t\t}, false)\n\n\t\treader.readAsDataURL(files[0])\n\t}\n\n\tgeneratePptx = files => {\n\t\tconst reader = new FileReader()\n\n\t\treader.onload = e => {\n\t\t\tconst content = reader.result;\n\t\t\tconst profile = jsYaml.load(content)\n\t\t\tconst name = profile.name\n\t\t\tlet pptx = new Profile(profile, this.state.photo).build()\n\t\t\tthis.setState({ pptx, name })\n\t\t}\n\n\t\treader.readAsText(files[0])\n\t}\n\n\tdownloadPptx = () => {\n\t\tthis.state.pptx.write('blob').then(data => {\n\t\t\tlet blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' });\n\t\t\tlet url = window.URL.createObjectURL(blob)\n\t\t\tlet a = document.createElement('a')\n\t\t\ta.href = url\n\t\t\ta.download = `${this.state.name}.pptx`\n\t\t\ta.click()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Container maxWidth=\"md\">\n\t\t\t\t<Instructions></Instructions>\n\t\t\t\t<Grid container spacing={0}\n\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\tjustify=\"center\">\n\t\t\t\t\t<Grid item xs={12} style={{ minHeight: '20vh' }}>\n\t\t\t\t\t\t<h1 style={{ textAlign: 'center' }}><img height=\"30px\" src=\"./images/logo-blue.png\" /> Profiles Maker</h1>\n\t\t\t\t\t</Grid>\n\t\t\t\t\t<Grid item xs={3}>\n\t\t\t\t\t\t{!this.state.photo &&\n\t\t\t\t\t\t\t<FileDrop onDrop={(files, event) => this.uploadPhoto(files)}>\n\t\t\t\t\t\t\t\tDrop your square shaped photo here\n\t\t\t\t\t</FileDrop>}\n\t\t\t\t\t\t{this.state.photo && <CheckCircleIcon style={{ fontSize: 120, color: '#0c62fb' }} />}\n\t\t\t\t\t</Grid>\n\t\t\t\t\t<Grid item xs={3}>\n\t\t\t\t\t\t{this.state.photo && !this.state.pptx &&\n\t\t\t\t\t\t\t<FileDrop onDrop={(files, event) => this.generatePptx(files)}>\n\t\t\t\t\t\t\t\tDrop the profile YAML here\n\t\t\t\t\t</FileDrop>}\n\t\t\t\t\t\t{this.state.pptx && <CheckCircleIcon style={{ fontSize: 120, color: '#0c62fb' }} />}\n\t\t\t\t\t</Grid>\n\t\t\t\t\t<Grid item xs={3}>\n\t\t\t\t\t\t{this.state.pptx && <a href=\"#\" onClick={this.downloadPptx}><CloudDownloadIcon style={{ fontSize: 120, color: 'green' }} /></a>}\n\t\t\t\t\t</Grid>\n\t\t\t\t</Grid>\n\t\t\t\t<div style={{ position: 'absolute', left: 0, bottom: 0, right: 0, textAlign: 'right' }}>\n\t\t\t\t\tby Dan Siwiec\n\t\t\t\t</div>\n\t\t\t</Container>\n\t\t)\n\t}\n\n}\n\nexport default Main\n","/Users/daniel.siwiec/workspace/slalom/profiles/src/Instructions.js",["41","42"],"const downloadTemplate = () => {\n fetch('./template.yaml')\n .then(response => {\n response.blob().then(blob => {\n let url = window.URL.createObjectURL(blob)\n let a = document.createElement('a')\n a.href = url\n a.download = 'template.yaml'\n a.click()\n })\n })\n}\n\nconst Instructions = props => (\n <div>\n <div>\n <div style={{ textAlign: 'right' }}>Download YAML <a href=\"#\" onClick={downloadTemplate}>template</a> | Install official Slalom <a href=\"https://twodegrees1.sharepoint.com/teams/marketing/SitePages/Slalom-fonts.aspx\" target=\"_blank\">fonts</a></div>\n </div>\n </div>\n)\n\nexport default Instructions",{"ruleId":"43","replacedBy":"44"},{"ruleId":"45","replacedBy":"46"},{"ruleId":"47","severity":1,"message":"48","line":62,"column":43,"nodeType":"49","endLine":62,"endColumn":93},{"ruleId":"50","severity":1,"message":"51","line":79,"column":27,"nodeType":"49","endLine":79,"endColumn":67},{"ruleId":"50","severity":1,"message":"51","line":17,"column":57,"nodeType":"49","endLine":17,"endColumn":96},{"ruleId":"52","severity":1,"message":"53","line":17,"column":135,"nodeType":"49","endLine":17,"endColumn":240},"no-native-reassign",["54"],"no-negated-in-lhs",["55"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","jsx-a11y/anchor-is-valid","The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid 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","react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener","no-global-assign","no-unsafe-negation"]