Rewrite "import then re-export" to a direct "re-export" approach via ast-grep
.
Rule file see in file-import-to-export.yml
- import Form, {
+ export {
import { | |
AsyncLocalStorage, | |
} from 'node:async_hooks' | |
import { | |
IterableWeakSet, | |
} from './IterableWeakSet' | |
/** | |
* Basic implementation of tc39 Stage 2 [Async Context](https://github.com/tc39/proposal-async-context) | |
* |
/** | |
* Allows arbitrary level property access and callable, | |
* support mock with usage likes: | |
* ``` | |
* faker = new FakeClass() | |
* faker.xxxx() | |
* | |
* faker() | |
* |
Rewrite "import then re-export" to a direct "re-export" approach via ast-grep
.
Rule file see in file-import-to-export.yml
- import Form, {
+ export {
function shell(command) | |
ok, result = hs.osascript.applescript(string.format('do shell script "%s"', command)) | |
return result | |
end | |
function sleep(n) | |
os.execute('sleep ' .. tonumber(n)) | |
end | |
-- https://github.com/smudge/nightlight |
# ~/.config/tmux/tmux.conf | |
# https://quickref.me/tmux | |
# https://man7.org/linux/man-pages/man1/tmux.1.html | |
# Install | |
# | |
# ```bash | |
# mkdir -p ~/.config/tmux | |
# curl -sL https://gist.github.com/zthxxx/bbbb37c100254d688236c21e8b977b85/raw/tmux.conf -o ~/.config/tmux/tmux.conf | |
# ``` |
# https://code.visualstudio.com/docs/editor/command-line#_working-with-extensions | |
# code --list-extensions | |
code --uninstall-extension cduruk.thrift | |
code --uninstall-extension byted-sec.bytesec-vscode | |
code --uninstall-extension byted-ide.ppe-debug | |
code --uninstall-extension byted-ide.ftt | |
code --uninstall-extension byted-ide.cloud-dev-task | |
code --uninstall-extension byted-ide.cloud-dev-debug | |
code --install-extension shalldie.background |
# https://www.lunarvim.org/ | |
# https://www.lunarvim.org/docs/installation | |
brew install neovim rust | |
brew install --cask homebrew/cask-fonts/font-hack-nerd-font | |
# on linux without homebrew, install with AppImage | |
# apt install -y libfuse2 | |
curl -fsSL https://github.com/neovim/neovim/releases/download/stable/nvim.appimage -o /usr/local/bin/nvim | |
chmod +x /usr/local/bin/nvim |
import path from 'path' | |
import { spawn } from 'child_process' | |
import { promises as fs } from 'fs' | |
import readline from 'readline' | |
import { chunk } from 'lodash-es' | |
/** | |
* usage: | |
* tsx <path>/.sources.mts <target dir> | |
*/ |
import path from 'path' | |
import { argv, fs } from 'zx' | |
import type { IModule } from 'dependency-cruiser' | |
import { | |
keyBy, | |
} from 'lodash-es' | |
/** | |
* depcruise -p -c dependency-cruiser.config.js --output-type json src > .logs/depcruise/src.json | |
*/ |
/** | |
* download command: | |
* curl -O https://gist.githubusercontent.com/zthxxx/6306cab0615df6c0545bbc4fb07179dc/raw/comb-import.mts | |
*/ | |
import path from 'path' | |
import os from 'os' | |
import { $, argv, fs } from 'zx' |