This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
jest: true, | |
}, | |
extends: [ | |
'react-app', | |
'airbnb', | |
'plugin:@typescript-eslint/recommended', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(document, window){ | |
if (!document || !window) { | |
return; | |
} | |
var styleText = '::-moz-focus-inner{border:0 !important;}:focus{outline: none !important;'; | |
var unfocus_style = document.createElement('STYLE'); | |
window.unfocus = function(){ | |
document.getElementsByTagName('HEAD')[0].appendChild(unfocus_style); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fields = document.querySelectorAll('[required]') | |
function validateField(field){ | |
//verify if error true | |
function verifyErrors(){ | |
let foundError = false; | |
for(let error in field.validity){ | |
if(field.validity[error] && !field.validity.valid){ | |
foundError = error |