This file contains hidden or 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 hidden or 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
{ | |
// // Define o tema do VSCode | |
// "workbench.colorTheme": "Min Dark", | |
// // "editor.lineHeight": 24, | |
// "editor.fontWeight": "400", | |
// "editor.fontFamily": "Fira Code", | |
// "editor.fontLigatures": true, | |
// // Aplica linhas verticais para lembrar de quebrar linha em códigos muito grandes | |
// "editor.rulers": [ | |
// 100 |
This file contains hidden or 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
// Example of a Private Route | |
import React from 'React' | |
import { Route as ReactDOMROute, RouteProps, Redirect } from 'react-router-dom' | |
import { useAuth } from 'useAuth' | |
function Route({ isPrivate: false, component: Component, ...rest }) { | |
const { user } = useAuth(); | |
return ( |
This file contains hidden or 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 same(arr1, arr2){ | |
if(arr1.length !== arr2.length){ | |
return false; | |
} | |
for(let i = 0; i < arr1.length; i++){ | |
let correctIndex = arr2.indexOf(arr1[i] ** 2) | |
if(correctIndex === -1) { | |
return false; | |
} | |
console.log(arr2); |
This file contains hidden or 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 validAnagram(first, second) { | |
if (first.length !== second.length) { | |
return false; | |
} | |
const lookup = {}; | |
for (let i = 0; i < first.length; i++) { | |
let letter = first[i]; | |
// if letter exists, increment, otherwise set to 1 |
This file contains hidden or 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
{ | |
"editor.autoClosingQuotes": "always", | |
"editor.lineHeight": 1.8, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [ | |
80, | |
120 | |
], | |
"extensions.ignoreRecommendations": true, |
OlderNewer