Skip to content

Instantly share code, notes, and snippets.

View heyman333's full-sized avatar
☀️
SUPER BUSY

lake.zero(레이크/한영수) heyman333

☀️
SUPER BUSY
View GitHub Profile
// Use this:
import MyUtilFn from 'utils/MyUtilFn'
// Instead of that:
import MyUtilFn from '../../../../utils/MyUtilFn'
@heyman333
heyman333 / config.js
Created November 13, 2019 06:30
blog
// babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module-resolver',
{
root: ['./src'],
},
],
@heyman333
heyman333 / plugin.json
Created November 13, 2019 06:32
plugin
{
"plugins": [
[
"module-resolver",
{
"root": ["./src"],
"alias": {
"underscore": "lodash",
"icons": "./assets/icons",
"imgs": "./assets/imgs",
@heyman333
heyman333 / diff.diff
Last active November 13, 2019 06:38
diff
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
+ 'babel-module': {},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.native.js'],
},
@heyman333
heyman333 / diff2.diff
Created November 13, 2019 06:43
diff2
{
"compilerOptions": {
+ "baseUrl": "./src",
"esModuleInterop": true,
"jsx": "react",
"lib": ["es6"],
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "esnext",
@heyman333
heyman333 / ts-precommit.bash
Created March 19, 2020 04:45 — forked from dcurletti/ts-precommit.bash
Bash script to typecheck project on TypeScript file changes
#!/bin/bash
# You can make the script more generic by changing the matching pattern
SRC_PATTERN=".*\.(ts|tsx)$"
# needed bc env vars change when run inside a git hook
# https://stackoverflow.com/questions/3542854/calling-git-pull-from-a-git-post-update-hook
# https://serverfault.com/questions/107608/git-post-receive-hook-with-git-pull-failed-to-find-a-valid-git-directory
unset $(git rev-parse --local-env-vars)
@heyman333
heyman333 / I'm a night 🦉
Last active October 29, 2020 16:13
I'm a night 🦉
🌞 Morning 117 commits █▍░░░░░░░░░░░░░░░░░░░ 6.6%
🌆 Daytime 541 commits ██████▍░░░░░░░░░░░░░░ 30.5%
🌃 Evening 621 commits ███████▎░░░░░░░░░░░░░ 35.1%
🌙 Night 492 commits █████▊░░░░░░░░░░░░░░░ 27.8%