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
| /* eslint-env node */ | |
| /* eslint-disable import/no-nodejs-modules */ | |
| /* eslint-disable import/no-commonjs */ | |
| /* eslint-disable import/no-dynamic-require */ | |
| const glob = require('glob') | |
| const path = require('path') | |
| function getPackageJsons(directory) { | |
| const packagePaths = glob.sync('**/package.json', { | |
| cwd: directory, |
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
| type A = { | |
| a: string | |
| b: string | |
| } | |
| const c = { | |
| a: 'a', | |
| b: 'b', | |
| c: 'c', |
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
| type A = { | |
| a: string | |
| b: string | |
| } | |
| const c = { | |
| a: 'a', | |
| b: 'b', | |
| c: 'c' |
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
| import { createBrowserRouter, RouteObject } from 'react-router-dom' | |
| const routes = [ | |
| myRoute1, | |
| myRoute2, | |
| myRoute3, | |
| ] satisfies RouteObject[] | |
| type Route = { |
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
| import { Suspense, useEffect, useState } from 'react' | |
| import { ErrorBoundary } from './components/ErrorBoundary' | |
| import { Loader } from './components/Loader' | |
| export function App() { | |
| const [search, setSearch] = useState<string>('') | |
| const [debouncedSearch, setDebouncedSearch] = useState<string>('') | |
| useEffect(() => { | |
| const timeout = setTimeout(() => { |
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
| // used so eslint-plugin-import can properly resolve dependencies using yarn2 | |
| let pnp | |
| try { | |
| pnp = require(`./.pnp.cjs`) | |
| } catch (error) { | |
| // not a problem | |
| } |
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 = { | |
| ignorePatterns: [ | |
| 'config/**/*', | |
| '**/build/**/*', | |
| '**/.yarn/**/*', | |
| '**/artifacts/**/*', | |
| '**/storybook-static/**/*', | |
| '**/node_modules/**/*', | |
| '**/*.config.js', | |
| '**/*rc.js', |
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
| const cwd = process.cwd() | |
| module.exports = function requireResolve(moduleName) { | |
| const resolveOpts = { | |
| paths: [ | |
| // will prefer this folder: | |
| path.resolve(cwd, '..', 'some-dep', 'node_modules'), | |
| // over this folder: | |
| path.resolve(cwd, 'node_modules'), | |
| ], |
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
| import React, { useContext, useMemo, useState } from 'react'; | |
| interface ExampleContextValue { | |
| value: number; | |
| setValue: (newValue: number) => void; | |
| } | |
| const ExampleContext = React.createContext<ExampleContextValue | undefined>( | |
| undefined, | |
| ); |
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
| export GOPATH=/Users/danielhoffmannbernardes/dev/go | |
| # ZSH stuff | |
| export ZSH=/Users/danielhoffmannbernardes/.oh-my-zsh | |
| ZSH_THEME="robbyrussell" | |
| plugins=( | |
| git | |
| ) | |
| source $ZSH/oh-my-zsh.sh |
NewerOlder