-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 9.51 KB
/
.eslintcache
1
[{"/home/ben/dev/tech-photo-form/src/reportWebVitals.js":"1","/home/ben/dev/tech-photo-form/src/index.js":"2","/home/ben/dev/tech-photo-form/src/App.js":"3","/home/ben/dev/tech-photo-form/src/components/index.js":"4","/home/ben/dev/tech-photo-form/src/components/ImageWrapper.js":"5","/home/ben/dev/tech-photo-form/src/components/DatePicker.tsx":"6","/home/ben/dev/tech-photo-form/src/components/Calendar.tsx":"7","/home/ben/dev/tech-photo-form/src/components/TimePicker.tsx":"8"},{"size":362,"mtime":1611620651473,"results":"9","hashOfConfig":"10"},{"size":500,"mtime":1611979736726,"results":"11","hashOfConfig":"10"},{"size":3721,"mtime":1612333495493,"results":"12","hashOfConfig":"10"},{"size":263,"mtime":1612253826423,"results":"13","hashOfConfig":"10"},{"size":4040,"mtime":1612332540590,"results":"14","hashOfConfig":"10"},{"size":405,"mtime":1612253683593,"results":"15","hashOfConfig":"10"},{"size":391,"mtime":1612253741513,"results":"16","hashOfConfig":"10"},{"size":634,"mtime":1612253711223,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},"1pjnhqi",{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"20"},{"filePath":"27","messages":"28","errorCount":0,"warningCount":9,"fixableErrorCount":0,"fixableWarningCount":0,"source":"29","usedDeprecatedRules":"20"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"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"},"/home/ben/dev/tech-photo-form/src/reportWebVitals.js",[],["37","38"],"/home/ben/dev/tech-photo-form/src/index.js",[],"/home/ben/dev/tech-photo-form/src/App.js",["39","40","41","42","43","44"],"/home/ben/dev/tech-photo-form/src/components/index.js",[],"/home/ben/dev/tech-photo-form/src/components/ImageWrapper.js",["45","46","47","48","49","50","51","52","53"],"import React, { useEffect, useState } from \"react\";\nimport EXIF from \"exif-js\"; // for reading image data\nimport * as dayjs from \"dayjs\";\nimport {\n Typography,\n Upload,\n message,\n Form,\n Input,\n Button,\n Select,\n Divider,\n} from \"antd\";\nimport { DatePicker } from \"../components\";\nconst { Title, Paragraph, Text, Link } = Typography;\nconst { Option } = Select;\n\n/* ImagePreviewer\n * One of these will be created for each image the user uploads.\n * It will allow the user to set attributes for the image\n *\n * props:\n * itemNum: the number assigned to this image (1,2,3, etc)\n * file: a js File object, the file that we're dealing with now\n * handleUpdate(formData): the function to handle updates to the form data\n * NOT YET: updateRemaining(formData): the function to update the remaining items with entered data\n */\nfunction ImageForm(props) {\n const [imgForm] = Form.useForm();\n var imgDate = dayjs(props.imgInfo[\"date\"]);\n console.log(imgDate);\n console.log(dayjs(\"2019-11-10T03:53:31-05:00\"));\n return (\n <div className=\"image-info-form-container\">\n <Divider />\n <Title level={2}>\n Image {props.itemNum}: {props.file.name}\n </Title>\n <img src={URL.createObjectURL(props.file)} className=\"image-preview\" />\n <Form\n form={imgForm}\n onFieldsChange={(changedFields, allFields) =>\n props.handleUpdate(allFields)\n }\n >\n <Form.Item label=\"Event/Topic\" name=\"event\">\n <Input placeholder=\"Men's Soccer vs. WPI\" />\n </Form.Item>\n <Form.Item label=\"Department\" name=\"department\">\n <Select placeholder=\"Select\">\n <Option value=\"spo\">SPO</Option>\n <Option value=\"fto\">FTO</Option>\n <Option value=\"rtz\">RTZ</Option>\n <Option value=\"cl\">CL</Option>\n </Select>\n </Form.Item>\n <Form.Item\n label=\"Date/Time Taken (from EXIF if available)\"\n name=\"datetime\"\n >\n <DatePicker\n defaultValue={imgDate.isValid() ? imgDate : undefined}\n key={imgDate} // necessary to ensure DatePicker re-renders when date found\n showTime={true}\n disabled={imgDate.isValid()}\n />\n </Form.Item>\n <Form.Item label=\"Caption\" name=\"caption\">\n <Input.TextArea placeholder=\"See the wiki for how to write a good caption\" />\n </Form.Item>\n <Form.Item label=\"Attribution (if not yourself)\" name=\"attribution\">\n <Input placeholder=\"Photo Provided by Dance Troupe\" />\n </Form.Item>\n {/* <Button\n type=\"link\"\n htmlType=\"button\"\n onClick={() =>\n alert(\n `filling others! ${JSON.stringify(imgForm.getFieldsValue(true))}`\n )\n }\n >\n copy inputs to remaining images\n </Button> */}\n </Form>\n </div>\n );\n}\n\n/* ImageWrapper\n * Parses the exif data of the image and renders the ImageForm\n */\nexport default function ImageWrapper(props) {\n const [imgExifData, setExifData] = useState({});\n const [imgDate, setImgDate] = useState(null);\n\n function parseEXIFDate(exifDate) {\n // parses a date in EXIF string format and returns a Date\n var b = exifDate.split(/\\D/); // split date string on any non-digit char (regex)\n var d = new Date(b[0], b[1] - 1, b[2], b[3], b[4], b[5]);\n return d;\n }\n\n useEffect(() => {\n EXIF.getData(props.file, function () {\n var exifDate = EXIF.getTag(this, \"DateTimeOriginal\");\n\n if (exifDate !== undefined) setImgDate(parseEXIFDate(exifDate));\n else setImgDate(null);\n\n // var exifData = EXIF.getAllTags(this);\n // if (exifData) {\n // setExifData(exifData);\n // console.log(`Image Date: ${EXIF.getTag(this, \"DateTimeOriginal\")}`);\n // } else {\n // console.log(\"No EXIF data found in image '\" + props.file.name + \"'.\");\n // }\n });\n }, [props.file]);\n\n return (\n <ImageForm\n {...props}\n imgInfo={{\n date: imgDate,\n }}\n />\n );\n}\n","/home/ben/dev/tech-photo-form/src/components/DatePicker.tsx",[],["54","55"],"/home/ben/dev/tech-photo-form/src/components/Calendar.tsx",[],"/home/ben/dev/tech-photo-form/src/components/TimePicker.tsx",[],{"ruleId":"56","replacedBy":"57"},{"ruleId":"58","replacedBy":"59"},{"ruleId":"60","severity":1,"message":"61","line":1,"column":8,"nodeType":"62","messageId":"63","endLine":1,"endColumn":12},{"ruleId":"60","severity":1,"message":"64","line":2,"column":17,"nodeType":"62","messageId":"63","endLine":2,"endColumn":26},{"ruleId":"60","severity":1,"message":"65","line":6,"column":3,"nodeType":"62","messageId":"63","endLine":6,"endColumn":10},{"ruleId":"60","severity":1,"message":"66","line":10,"column":3,"nodeType":"62","messageId":"63","endLine":10,"endColumn":9},{"ruleId":"60","severity":1,"message":"67","line":17,"column":27,"nodeType":"62","messageId":"63","endLine":17,"endColumn":31},{"ruleId":"60","severity":1,"message":"68","line":17,"column":33,"nodeType":"62","messageId":"63","endLine":17,"endColumn":37},{"ruleId":"60","severity":1,"message":"69","line":6,"column":3,"nodeType":"62","messageId":"63","endLine":6,"endColumn":9},{"ruleId":"60","severity":1,"message":"65","line":7,"column":3,"nodeType":"62","messageId":"63","endLine":7,"endColumn":10},{"ruleId":"60","severity":1,"message":"70","line":10,"column":3,"nodeType":"62","messageId":"63","endLine":10,"endColumn":9},{"ruleId":"60","severity":1,"message":"71","line":15,"column":16,"nodeType":"62","messageId":"63","endLine":15,"endColumn":25},{"ruleId":"60","severity":1,"message":"67","line":15,"column":27,"nodeType":"62","messageId":"63","endLine":15,"endColumn":31},{"ruleId":"60","severity":1,"message":"68","line":15,"column":33,"nodeType":"62","messageId":"63","endLine":15,"endColumn":37},{"ruleId":"72","severity":1,"message":"73","line":39,"column":7,"nodeType":"74","endLine":39,"endColumn":78},{"ruleId":"60","severity":1,"message":"75","line":94,"column":10,"nodeType":"62","messageId":"63","endLine":94,"endColumn":21},{"ruleId":"60","severity":1,"message":"76","line":94,"column":23,"nodeType":"62","messageId":"63","endLine":94,"endColumn":34},{"ruleId":"56","replacedBy":"57"},{"ruleId":"58","replacedBy":"59"},"no-native-reassign",["77"],"no-negated-in-lhs",["78"],"no-unused-vars","'logo' is defined but never used.","Identifier","unusedVar","'useEffect' is defined but never used.","'message' is defined but never used.","'Select' is defined but never used.","'Text' is assigned a value but never used.","'Link' is assigned a value but never used.","'Upload' is defined but never used.","'Button' is defined but never used.","'Paragraph' is assigned a value but never used.","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","'imgExifData' is assigned a value but never used.","'setExifData' is assigned a value but never used.","no-global-assign","no-unsafe-negation"]