Skip to content

Instantly share code, notes, and snippets.

View emersxw's full-sized avatar
👻

Emerson L. emersxw

👻
View GitHub Profile
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
'react-app',
'airbnb',
'plugin:@typescript-eslint/recommended',
{
// // 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
// 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 (
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);
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
{
"editor.autoClosingQuotes": "always",
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
"extensions.ignoreRecommendations": true,