Skip to content

Instantly share code, notes, and snippets.

View connorshea's full-sized avatar
:shipit:
Shipping

Connor Shea connorshea

:shipit:
Shipping
View GitHub Profile
@connorshea
connorshea / migrate.md
Last active December 1, 2025 05:37
Instructions for migrating from Prettier to the oxfmt alpha

Migrating from Prettier to oxfmt

This guide is intended to help migrate projects from Prettier to oxfmt.

Note that oxfmt is in alpha, and may not be suitable for production use in complex setups.

The oxfmt alpha only supports formatting JavaScript and TypeScript files (including JSX syntax). If you need support for other languages like JSON, YAML, or Markdown, you may want to wait.

Step 1: Upgrade Prettier to v3.7

@connorshea
connorshea / report-rule-support.mjs
Created November 30, 2025 21:20
Oxlint Rules stats, as of Nov 30, 2025. This JS script needs to be placed in `tasks/lint_rules/src/` in the oxc repo, and then can be run as a node.js script.
#!/usr/bin/env node
import { createESLintLinter, loadTargetPluginRules } from "./eslint-rules.mjs";
import {
createRuleEntries,
updateImplementedStatus,
updateNotSupportedStatus,
updatePendingFixStatus,
overrideTypeScriptPluginStatusWithEslintPluginStatus,
syncVitestPluginStatusWithJestPluginStatus,
syncUnicornPluginStatusWithEslintPluginStatus,
@connorshea
connorshea / oxlint.json
Created November 17, 2025 06:00
`oxlint --rules -f=json --type-aware`
[
{
"scope": "eslint",
"value": "array-callback-return",
"category": "pedantic",
"type_aware": false,
"has_fix": false,
"docs_url": "https://oxc.rs/docs/guide/usage/linter/rules/eslint/array-callback-return.html"
},
{
@connorshea
connorshea / mastotest.md
Last active November 9, 2025 22:08
Testing oxlint patches using mastodon.

How to test oxlint patches in the mastodon repo.

NOTE: This assumes you have oxc and mastodon cloned into the ~/code directory specifically, adjust the directions accordingly for whatever directory you store your git repositories.

Setup:

  • Clone oxc and mastodon repos locally.
    • git clone https://github.com/mastodon/mastodon
    • git clone https://github.com/oxc-project/oxc
  • Set up oxc to be able to build it locally with Rust, etc. (see oxc docs)
  • In the root of the mastodon repo, create a directory oxlint-dist/ to hold the built oxc files.
https://wormhole.app/MBKn6#nztdHM323zzWZ5Iapf1u3g
ANIME_SPECIFIC_PROPERTIES = [
'P1811', # list of episodes
'P1113', # number of episodes
'P364', # original language of film or TV show
'P449', # original broadcaster
'P2047', # duration
'P86', # composer
'P57', # director
@connorshea
connorshea / gdq-parser-helper.rb
Last active July 2, 2022 18:45
Proof-of-concept script that scrapes the GDQ schedule page and then pulls the vglist and IGDB IDs from the vglist API. This'd then be used to pull cover data and such from IGDB. It doesn't get every game in the schedule, but it can get most of them automatically, which will reduce the amount of manual effort involved in setting up the data for a…
require 'json'
gdq_schedule = JSON.parse(File.read('gdq.json'))
total_entries = gdq_schedule.count
puts "Total entries: #{total_entries}"
game_only_entries = gdq_schedule.filter { |entry| !entry['non_game'] }.count
puts "Game-only entries: #{game_only_entries}"
entries_with_vglist_ids = gdq_schedule.filter { |entry| !entry['vglist_id'].nil? }.count
puts "Entries with vglist IDs: #{entries_with_vglist_ids} (#{(entries_with_vglist_ids.fdiv(game_only_entries) * 100).round(2)}%)"
@connorshea
connorshea / sorbet-rails-check.svg
Created July 5, 2021 19:18
TypedObject#name with typechecking vs without typechecking. For a PR that improves the performance of Parlour
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@connorshea
connorshea / README.md
Last active July 5, 2020 19:28
JSON array of games on vglist that have a Wikidata ID but the Wikidata item has no vglist ID property.

JSON array of games on vglist that have a Wikidata ID but the Wikidata item has no vglist ID property. These aren't added automatically because the names on vglist and Wikidata differ. Someone should go through each of these (possibly with a simple script that'll automatically open each item in your browser) and let you decide whether they match, but not me because I'm lazy.