Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
JS_FILES="$(git diff --name-only --staged --diff-filter=ACM | grep '.js$')"
if [ -n "$JS_FILES" ]; then
set -e
echo 'eslint' && ./node_modules/.bin/eslint --fix $JS_FILES
echo 'prettier' && ./node_modules/.bin/prettier --write $JS_FILES
echo 'git add' && git add $JS_FILES
fi
@shannonmoeller
shannonmoeller / goodbye-frontend-tooling.md
Last active October 18, 2022 15:51
Why I won't be merging that TypeScript PR.

Goodbye Frontend Tooling

I started learning web development around 1999. We got a coupon in the mail for one free day class at a just-opened New Horizons computer training center. I chose "HTML 4.0 for Windows 98" from the brochure at random because I didn't know what any of it meant. When my dad picked me up at the end of the day I told him, "I know what I want to do for a living." The next time we went to Borders I picked up a copy of Sam's Teach Yourself Web Publishing with HTML 4 in 21 days with my paper route money and read it cover to cover in a week. We didn't have a computer with internet access at home, so I'd head to the library or use a spare computer at my dad's office and practice building pages with Notepad and keep my work with me on floppy disks.

The web and how we access it has changed a lot over the past two decades and I've had the pleasure of growing with it; from PHP and table-based layouts to full-stack Jav

@shannonmoeller
shannonmoeller / define.js
Last active October 18, 2022 15:55
Custom elements without the class.
export function define(name, init) {
class CustomElement extends HTMLElement {
#connection = null;
#initialized = false;
get signal() {
return this.#connection?.signal;
}
connectedCallback() {