-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 16.9 KB
/
.eslintcache
1
[{"D:\\web-spawner\\src\\App.tsx":"1","D:\\web-spawner\\src\\index.tsx":"2","D:\\web-spawner\\src\\pages\\Main.tsx":"3","D:\\web-spawner\\src\\components\\Map.tsx":"4","D:\\web-spawner\\src\\reportWebVitals.ts":"5","D:\\web-spawner\\src\\components\\Sidebar.tsx":"6","D:\\web-spawner\\src\\routes.tsx":"7","D:\\web-spawner\\src\\hooks\\useUrlQueries.ts":"8","D:\\web-spawner\\src\\utils\\spawn.ts":"9","D:\\web-spawner\\src\\hooks\\useSpawnData.ts":"10","D:\\web-spawner\\src\\hooks\\usePrevious.ts":"11","D:\\web-spawner\\src\\components\\Modal.tsx":"12","D:\\web-spawner\\src\\components\\CrudSpawnData.tsx":"13","D:\\web-spawner\\src\\components\\MapMarker.tsx":"14"},{"size":316,"mtime":1611870407185,"results":"15","hashOfConfig":"16"},{"size":613,"mtime":1611845854202,"results":"17","hashOfConfig":"16"},{"size":563,"mtime":1620761742429,"results":"18","hashOfConfig":"16"},{"size":4363,"mtime":1620825586009,"results":"19","hashOfConfig":"16"},{"size":440,"mtime":1611784393694,"results":"20","hashOfConfig":"16"},{"size":4347,"mtime":1620769466764,"results":"21","hashOfConfig":"16"},{"size":360,"mtime":1611845984484,"results":"22","hashOfConfig":"16"},{"size":1052,"mtime":1611846009216,"results":"23","hashOfConfig":"16"},{"size":415,"mtime":1611850555211,"results":"24","hashOfConfig":"16"},{"size":2208,"mtime":1620765712625,"results":"25","hashOfConfig":"16"},{"size":207,"mtime":1611852230291,"results":"26","hashOfConfig":"16"},{"size":2612,"mtime":1620755943361,"results":"27","hashOfConfig":"16"},{"size":11731,"mtime":1620813408202,"results":"28","hashOfConfig":"16"},{"size":3752,"mtime":1620825382557,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nycsi3",{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"34"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"41","messages":"42","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"57"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"D:\\web-spawner\\src\\App.tsx",[],"D:\\web-spawner\\src\\index.tsx",[],["60","61"],"D:\\web-spawner\\src\\pages\\Main.tsx",[],"D:\\web-spawner\\src\\components\\Map.tsx",["62"],"D:\\web-spawner\\src\\reportWebVitals.ts",[],"D:\\web-spawner\\src\\components\\Sidebar.tsx",["63"],"D:\\web-spawner\\src\\routes.tsx",[],"D:\\web-spawner\\src\\hooks\\useUrlQueries.ts",[],"D:\\web-spawner\\src\\utils\\spawn.ts",[],"D:\\web-spawner\\src\\hooks\\useSpawnData.ts",["64"],"D:\\web-spawner\\src\\hooks\\usePrevious.ts",[],"D:\\web-spawner\\src\\components\\Modal.tsx",[],"D:\\web-spawner\\src\\components\\CrudSpawnData.tsx",["65"],"import { FC } from 'react'\nimport { useForm, useFieldArray, Controller } from 'react-hook-form'\nimport Select from 'react-select'\n\nimport creatureTypes from '../data/creatureTypes.json'\nimport Modal from './Modal'\n\ninterface Props {\n selectedSpawn: any\n selectedSpawnIndex: number\n updateSpawnData: (selectedSpawn: any, spawnIndex: number) => void\n onCancel: () => void\n}\n\ninterface Entry {\n name: { label: string; value: string }\n maxCount: number\n probability: number\n}\n\ninterface Inputs {\n spawnType: { label: string; value: string }\n locationX: number\n locationY: number\n locationZ: number\n homeRange: number\n walkingRange: number\n minDelay: string\n maxDelay: string\n entries: Entry[]\n}\n\nconst CrudselectedSpawn: FC<Props> = ({\n selectedSpawn,\n selectedSpawnIndex,\n updateSpawnData,\n onCancel,\n}) => {\n const {\n register,\n control,\n handleSubmit,\n formState: { errors },\n } = useForm<Inputs>({\n ...(selectedSpawn\n ? {\n defaultValues: {\n spawnType: { label: selectedSpawn.type, value: selectedSpawn.type },\n locationX: selectedSpawn.location[0],\n locationY: selectedSpawn.location[1],\n locationZ: selectedSpawn.location[2],\n homeRange: selectedSpawn.homeRange,\n walkingRange: selectedSpawn.walkingRange,\n minDelay: selectedSpawn.minDelay,\n maxDelay: selectedSpawn.maxDelay,\n entries: selectedSpawn.entries.map((entry: any) => ({\n ...entry,\n name: { label: entry.name, value: entry.name },\n })),\n },\n }\n : {}),\n })\n\n const { fields, append, remove } = useFieldArray({\n control,\n name: 'entries',\n })\n\n const onSubmit = (data: any) => {\n updateSpawnData(\n {\n ...selectedSpawn,\n count: data.entries.reduce(\n (acc: any, curr: any) => acc + parseInt(curr.maxCount, 10),\n 0,\n ),\n type: data.spawnType.value,\n location: [\n parseInt(data.locationX, 10),\n parseInt(data.locationY, 10),\n parseInt(data.locationZ, 10),\n ],\n homeRange: parseInt(data.homeRange, 10),\n walkingRange: parseInt(data.walkingRange, 10),\n minDelay:\n data.minDelay.length === 5 ? `${data.minDelay}:00` : data.minDelay,\n maxDelay:\n data.maxDelay.length === 5 ? `${data.maxDelay}:00` : data.maxDelay,\n entries: data.entries.map((entry: any) => ({\n maxCount: parseInt(entry.maxCount, 10),\n probability: parseInt(entry.probability, 10),\n name: entry.name.value,\n })),\n },\n selectedSpawnIndex,\n )\n onCancel()\n }\n\n return (\n <Modal onCancel={onCancel} proceedForm=\"crud-spawn-data\">\n <form id=\"crud-spawn-data\" onSubmit={handleSubmit(onSubmit)}>\n <div className=\"overflow-hidden\">\n <div className=\"px-4 py-5 bg-white sm:p-6\">\n <div className=\"grid grid-cols-6 gap-6\">\n <div className=\"col-span-6\">\n <label\n htmlFor=\"country\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Type\n </label>\n <Controller\n name=\"spawnType\"\n control={control}\n render={({ field }) => (\n <Select\n {...field}\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n placeholder=\"Type\"\n options={[{ label: 'Spawner', value: 'Spawner' }]}\n />\n )}\n />\n </div>\n\n <div className=\"col-span-6 sm:col-span-6 lg:col-span-2\">\n <label\n htmlFor=\"locationX\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Location X\n </label>\n <input\n type=\"number\"\n id=\"locationX\"\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register('locationX')}\n />\n </div>\n\n <div className=\"col-span-6 sm:col-span-3 lg:col-span-2\">\n <label\n htmlFor=\"locationY\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Location Y\n </label>\n <input\n type=\"number\"\n id=\"locationY\"\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register('locationY')}\n />\n </div>\n\n <div className=\"col-span-6 sm:col-span-3 lg:col-span-2\">\n <label\n htmlFor=\"locationZ\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Location Z\n </label>\n <input\n type=\"number\"\n id=\"locationZ\"\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register('locationZ')}\n />\n </div>\n\n <div className=\"col-span-6 sm:col-span-3\">\n <label\n htmlFor=\"homeRange\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Home Range\n </label>\n <input\n type=\"number\"\n id=\"homeRange\"\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register('homeRange')}\n />\n </div>\n\n <div className=\"col-span-6 sm:col-span-3\">\n <label\n htmlFor=\"walkingRange\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Walking Range\n </label>\n <input\n type=\"number\"\n id=\"walkingRange\"\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register('walkingRange')}\n />\n </div>\n\n <div className=\"col-span-6 sm:col-span-3\">\n <label\n htmlFor=\"minDelay\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Min Delay\n </label>\n <input\n type=\"time\"\n step=\"1\"\n id=\"minDelay\"\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register('minDelay')}\n />\n </div>\n\n <div className=\"col-span-6 sm:col-span-3\">\n <label\n htmlFor=\"maxDelay\"\n className=\"block text-sm font-medium text-gray-700\"\n >\n Max Delay\n </label>\n <input\n type=\"time\"\n step=\"1\"\n id=\"maxDelay\"\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register('maxDelay')}\n />\n </div>\n\n <h3 className=\"col-span-6 text-lg font-medium leading-6 text-gray-900\">\n Entries\n </h3>\n\n {fields.map((field, index) => (\n <div\n key={field.id}\n className=\"grid grid-cols-6 gap-3 col-span-6\"\n >\n <div className=\"col-span-3\">\n <label\n htmlFor={`entries.${index}.name`}\n className=\"block text-sm font-medium text-gray-700\"\n >\n Name\n </label>\n <Controller\n name={`entries.${index}.name` as const}\n control={control}\n render={({ field }) => (\n <Select\n {...field}\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n placeholder=\"Name\"\n options={creatureTypes}\n />\n )}\n />\n </div>\n <div className=\"col-span-1\">\n <label\n htmlFor={`entries.${index}.maxCount`}\n className=\"block text-sm font-medium text-gray-700\"\n >\n Count\n </label>\n <input\n type=\"number\"\n id={`entries.${index}.maxCount`}\n defaultValue={field.maxCount}\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register(`entries.${index}.maxCount` as const)}\n />\n </div>\n\n <div className=\"col-span-1\">\n <label\n htmlFor={`entries.${index}.probability`}\n className=\"block text-sm font-medium text-gray-700\"\n >\n Probability\n </label>\n <input\n type=\"number\"\n id={`entries.${index}.probability`}\n defaultValue={field.probability}\n className=\"mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md\"\n {...register(`entries.${index}.probability` as const)}\n />\n </div>\n\n <div className=\"col-span-1\">\n <button\n type=\"button\"\n onClick={() => remove(index)}\n className=\"inline-flex justify-center mt-6 py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500\"\n >\n Delete\n </button>\n </div>\n </div>\n ))}\n <div className=\"col-span-6\">\n <button\n type=\"button\"\n onClick={() => append({})}\n className=\"inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500\"\n >\n Add another\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n </Modal>\n )\n}\n\nexport default CrudselectedSpawn\n","D:\\web-spawner\\src\\components\\MapMarker.tsx",[],{"ruleId":"66","replacedBy":"67"},{"ruleId":"68","replacedBy":"69"},{"ruleId":"70","severity":1,"message":"71","line":17,"column":9,"nodeType":"72","messageId":"73","endLine":17,"endColumn":12},{"ruleId":"70","severity":1,"message":"74","line":1,"column":24,"nodeType":"72","messageId":"73","endLine":1,"endColumn":30},{"ruleId":"75","severity":1,"message":"76","line":60,"column":6,"nodeType":"77","endLine":60,"endColumn":8,"suggestions":"78"},{"ruleId":"70","severity":1,"message":"79","line":43,"column":18,"nodeType":"72","messageId":"73","endLine":43,"endColumn":24},"no-native-reassign",["80"],"no-negated-in-lhs",["81"],"@typescript-eslint/no-unused-vars","'map' is assigned a value but never used.","Identifier","unusedVar","'useRef' is defined but never used.","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'params'. Either include it or remove the dependency array.","ArrayExpression",["82"],"'errors' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"83","fix":"84"},"Update the dependencies array to be: [params]",{"range":"85","text":"86"},[1996,1998],"[params]"]