-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 8.04 KB
/
.eslintcache
1
[{"/Users/paulgerhartz/notes-app-client/src/index.js":"1","/Users/paulgerhartz/notes-app-client/src/App.js":"2","/Users/paulgerhartz/notes-app-client/src/reportWebVitals.js":"3","/Users/paulgerhartz/notes-app-client/src/Routes.js":"4","/Users/paulgerhartz/notes-app-client/src/containers/Home.js":"5","/Users/paulgerhartz/notes-app-client/src/containers/NotFound.js":"6","/Users/paulgerhartz/notes-app-client/src/config.js":"7","/Users/paulgerhartz/notes-app-client/src/containers/Login.js":"8","/Users/paulgerhartz/notes-app-client/src/libs/contextLib.js":"9","/Users/paulgerhartz/notes-app-client/src/components/LoaderButton.js":"10","/Users/paulgerhartz/notes-app-client/src/libs/errorLib.js":"11","/Users/paulgerhartz/notes-app-client/src/libs/hooksLib.js":"12","/Users/paulgerhartz/notes-app-client/src/containers/Signup.js":"13","/Users/paulgerhartz/notes-app-client/src/containers/NewNote.js":"14","/Users/paulgerhartz/notes-app-client/src/libs/awsLib.js":"15","/Users/paulgerhartz/notes-app-client/src/containers/Notes.js":"16"},{"size":1201,"mtime":1610058314752,"results":"17","hashOfConfig":"18"},{"size":2304,"mtime":1610119306608,"results":"19","hashOfConfig":"18"},{"size":362,"mtime":1610049166009,"results":"20","hashOfConfig":"18"},{"size":899,"mtime":1610120050123,"results":"21","hashOfConfig":"18"},{"size":2314,"mtime":1610118332143,"results":"22","hashOfConfig":"18"},{"size":199,"mtime":1610053428891,"results":"23","hashOfConfig":"18"},{"size":634,"mtime":1610119459057,"results":"24","hashOfConfig":"18"},{"size":1882,"mtime":1610063403424,"results":"25","hashOfConfig":"18"},{"size":168,"mtime":1610058726881,"results":"26","hashOfConfig":"18"},{"size":490,"mtime":1610062430750,"results":"27","hashOfConfig":"18"},{"size":200,"mtime":1610062631318,"results":"28","hashOfConfig":"18"},{"size":286,"mtime":1610063629841,"results":"29","hashOfConfig":"18"},{"size":3771,"mtime":1610063704592,"results":"30","hashOfConfig":"18"},{"size":2421,"mtime":1610117539387,"results":"31","hashOfConfig":"18"},{"size":245,"mtime":1610117422387,"results":"32","hashOfConfig":"18"},{"size":4445,"mtime":1610119169838,"results":"33","hashOfConfig":"18"},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"uxf6vi",{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"63","usedDeprecatedRules":"44"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"44"},"/Users/paulgerhartz/notes-app-client/src/index.js",[],"/Users/paulgerhartz/notes-app-client/src/App.js",[],"/Users/paulgerhartz/notes-app-client/src/reportWebVitals.js",[],"/Users/paulgerhartz/notes-app-client/src/Routes.js",[],"/Users/paulgerhartz/notes-app-client/src/containers/Home.js",[],["68","69"],"/Users/paulgerhartz/notes-app-client/src/containers/NotFound.js",[],"/Users/paulgerhartz/notes-app-client/src/config.js",[],"/Users/paulgerhartz/notes-app-client/src/containers/Login.js",[],"/Users/paulgerhartz/notes-app-client/src/libs/contextLib.js",[],"/Users/paulgerhartz/notes-app-client/src/components/LoaderButton.js",[],"/Users/paulgerhartz/notes-app-client/src/libs/errorLib.js",[],"/Users/paulgerhartz/notes-app-client/src/libs/hooksLib.js",[],"/Users/paulgerhartz/notes-app-client/src/containers/Signup.js",[],"/Users/paulgerhartz/notes-app-client/src/containers/NewNote.js",["70"],"import React, { useRef, useState } from \"react\";\nimport Form from \"react-bootstrap/Form\";\nimport { useHistory } from \"react-router-dom\";\nimport LoaderButton from \"../components/LoaderButton\";\nimport { onError } from \"../libs/errorLib\";\nimport config from \"../config\";\nimport \"./NewNote.css\";\nimport { API } from \"aws-amplify\";\nimport { s3Upload } from \"../libs/awsLib\";\n\nexport default function NewNote() {\n const file = useRef(null);\n const history = useHistory();\n const [content, setContent] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n\n function validateForm() {\n return content.length > 0;\n }\n\n function handleFileChange(event) {\n file.current = event.target.files[0];\n }\n\n async function handleSubmit(event) {\n event.preventDefault();\n\n if (file.current && file.current.size > config.MAX_ATTACHMENT_SIZE) {\n alert(\n `Please pick a file smaller than ${config.MAX_ATTACHMENT_SIZE /\n 1000000} MB.`\n );\n return;\n }\n\n setIsLoading(true);\n }\n\n async function handleSubmit(event) {\n event.preventDefault();\n \n if (file.current && file.current.size > config.MAX_ATTACHMENT_SIZE) {\n alert(\n `Please pick a file smaller than ${\n config.MAX_ATTACHMENT_SIZE / 1000000\n } MB.`\n );\n return;\n }\n \n setIsLoading(true);\n \n try {\n const attachment = file.current ? await s3Upload(file.current) : null;\n \n await createNote({ content, attachment });\n history.push(\"/\");\n } catch (e) {\n onError(e);\n setIsLoading(false);\n }\n }\n \n \n \n function createNote(note) {\n return API.post(\"notes\", \"/notes\", {\n body: note\n });\n }\n \n\n return (\n <div className=\"NewNote\">\n <Form onSubmit={handleSubmit}>\n <Form.Group controlId=\"content\">\n <Form.Control\n value={content}\n as=\"textarea\"\n onChange={(e) => setContent(e.target.value)}\n />\n </Form.Group>\n <Form.Group controlId=\"file\">\n <Form.Label>Attachment</Form.Label>\n <Form.Control onChange={handleFileChange} type=\"file\" />\n </Form.Group>\n <LoaderButton\n block\n type=\"submit\"\n size=\"lg\"\n variant=\"primary\"\n isLoading={isLoading}\n disabled={!validateForm()}\n >\n Create\n </LoaderButton>\n </Form>\n </div>\n );\n}","/Users/paulgerhartz/notes-app-client/src/libs/awsLib.js",[],"/Users/paulgerhartz/notes-app-client/src/containers/Notes.js",[],{"ruleId":"71","replacedBy":"72"},{"ruleId":"73","replacedBy":"74"},{"ruleId":"75","severity":1,"message":"76","line":39,"column":18,"nodeType":"77","messageId":"78","endLine":39,"endColumn":30},"no-native-reassign",["79"],"no-negated-in-lhs",["80"],"no-redeclare","'handleSubmit' is already defined.","Identifier","redeclared","no-global-assign","no-unsafe-negation"]