Skip to content

Instantly share code, notes, and snippets.

View tiagobnobrega's full-sized avatar
🏠
Working from home

Tiago Nobrega tiagobnobrega

🏠
Working from home
View GitHub Profile
@tiagobnobrega
tiagobnobrega / node.eslintrc.js
Created March 22, 2021 13:18
Nodejs eslint config
module.exports = {
plugins: [
"@typescript-eslint",
"eslint-comments",
"jest",
"promise",
"unicorn",
],
extends: [
"plugin:@typescript-eslint/recommended",
@tiagobnobrega
tiagobnobrega / react.eslintrc.js
Created March 15, 2021 16:43
React Typescript eslintrc configuration
module.exports = {
plugins: [
"@typescript-eslint",
"eslint-comments",
"jest",
"promise",
"unicorn",
],
extends: [
"plugin:@typescript-eslint/recommended",
@tiagobnobrega
tiagobnobrega / ID.js
Created July 11, 2018 20:24
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`