1 |
- [{"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\App.tsx":"1","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\Spoiler\\Spoiler.tsx":"2","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\RangeInput\\RangeInput.tsx":"3","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\PasswordConfirm\\PasswordConfirm.tsx":"4","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\index.tsx":"5","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\Timer\\Timer.tsx":"6","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\TimerContainer.tsx":"7","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\TimerControl\\TimerControl.tsx":"8","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\TimerPresentation\\TimerPresentation.tsx":"9"},{"size":1087,"mtime":1643208845639,"results":"10","hashOfConfig":"11"},{"size":477,"mtime":1643192083054,"results":"12","hashOfConfig":"11"},{"size":927,"mtime":1643193674589,"results":"13","hashOfConfig":"11"},{"size":2093,"mtime":1643197654509,"results":"14","hashOfConfig":"11"},{"size":317,"mtime":1643125579998,"results":"15","hashOfConfig":"11"},{"size":876,"mtime":1643223640488,"results":"16","hashOfConfig":"11"},{"size":579,"mtime":1643223668831,"results":"17","hashOfConfig":"11"},{"size":2195,"mtime":1643223466951,"results":"18","hashOfConfig":"11"},{"size":2165,"mtime":1643224141776,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1yc3slw",{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"28"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\App.tsx",[],"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\Spoiler\\Spoiler.tsx",[],"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\RangeInput\\RangeInput.tsx",[],"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\PasswordConfirm\\PasswordConfirm.tsx",["39","40","41"],"import { number } from 'prop-types'\r\nimport React, { useState } from 'react'\r\nimport s from './PasswordConfirm.module.css'\r\n\r\ninterface IPasswordConfirmProps {\r\n min: number\r\n}\r\nconst PasswordConfirm = ({ min }: IPasswordConfirmProps) => {\r\n \r\n const [password, setPassword] = useState<string>('')\r\n const [passwordConfirm,setPasswordConfirm] = useState<string>('')\r\n const handlePassword = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n const value = e.target.value\r\n const name = e.target.name\r\n switch (name) {\r\n case 'password':\r\n setPassword(value)\r\n break;\r\n case 'confirmPassword':\r\n setPasswordConfirm(value)\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n const isValid = (password: string) => {\r\n const reg = '[^\\w\\d]*(([0-9]+.*[A-Za-z]+.*)|[A-Za-z]+.*([0-9]+.*))'\r\n return password&& password.length >= min&&new RegExp(reg).test(password) ? true:false\r\n }\r\n\r\n const isConfirmed = () => {\r\n return password && passwordConfirm && password === passwordConfirm ? true : false\r\n }\r\n \r\n return (\r\n <div className={s.passwordConfirmWrapper}>\r\n <input onChange={handlePassword} className={s.password}\r\n name='password' type='password'></input>\r\n <p className={isValid(password) ? s.passwordValue : s.notValid}>\r\n password : {isValid(password) ? password : 'Password not valid'}</p>\r\n <input onChange={handlePassword} className={s.passwordConfirm}\r\n name='confirmPassword' type='password'></input>\r\n <p className={isValid(passwordConfirm) ? s.confirmPasswordValue : s.notValid}>\r\n passwordConfirm : {isValid(passwordConfirm) ? passwordConfirm : ' PasswordConfirm not valid'}</p>\r\n <p className={isConfirmed()?s.valid:s.notValid}>isPassword confirmed :\r\n {isConfirmed()? \" confirmed!\" : \" not confirmed\"}</p>\r\n </div>\r\n )\r\n}\r\n\r\nexport default PasswordConfirm","D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\index.tsx",[],"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\Timer\\Timer.tsx",[],"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\TimerContainer.tsx",[],"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\TimerControl\\TimerControl.tsx",[],"D:\\web\\NIX\\REACT-NIX\\hw-react-2\\src\\components\\TimerContainer\\TimerPresentation\\TimerPresentation.tsx",[],{"ruleId":"42","severity":1,"message":"43","line":1,"column":10,"nodeType":"44","messageId":"45","endLine":1,"endColumn":16},{"ruleId":"46","severity":1,"message":"47","line":28,"column":24,"nodeType":"48","messageId":"49","endLine":28,"endColumn":25,"suggestions":"50"},{"ruleId":"46","severity":1,"message":"51","line":28,"column":26,"nodeType":"48","messageId":"49","endLine":28,"endColumn":27,"suggestions":"52"},"@typescript-eslint/no-unused-vars","'number' is defined but never used.","Identifier","unusedVar","no-useless-escape","Unnecessary escape character: \\w.","Literal","unnecessaryEscape",["53","54"],"Unnecessary escape character: \\d.",["55","56"],{"messageId":"57","fix":"58","desc":"59"},{"messageId":"60","fix":"61","desc":"62"},{"messageId":"57","fix":"63","desc":"59"},{"messageId":"60","fix":"64","desc":"62"},"removeEscape",{"range":"65","text":"66"},"Remove the `\\`. This maintains the current functionality.","escapeBackslash",{"range":"67","text":"68"},"Replace the `\\` with `\\\\` to include the actual backslash character.",{"range":"69","text":"66"},{"range":"70","text":"68"},[880,881],"",[880,880],"\\",[882,883],[882,882]]
|