-
Notifications
You must be signed in to change notification settings - Fork 8
feat: migrate from eslint to oxlint #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fd3a073
0e3daeb
248b970
82277c3
37a2c40
efb2918
409656f
509e34d
1cf5bed
0f99575
3c1eaf2
47d3de0
69f732b
386aaeb
9cc4e85
c7036a0
fd35160
96047a1
d80ef9b
9d6e2f6
1e2e3ed
a880ea5
eb33e59
f020379
793ca0f
fa1e8a1
3c4f77c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| name: python-inline-scripts | ||
| description: Guide for running inline Python scripts with uv | ||
| --- | ||
|
|
||
| ## Python Inline Scripts with uv | ||
|
|
||
| ### IMPORTANT | ||
|
|
||
| - NEVER add stdlib modules like json, os, re, etc. to dependencies OR THE SCRIPT WILL FAIL | ||
| - ALWAYS assume Python 3.12+ | ||
|
|
||
| ### Example | ||
|
|
||
| ```bash | ||
| uv run --no-project -q --script - < <(cat <<'EOF' | ||
| # /// script | ||
| # # ONLY add dependencies array if you need PyPi packages | ||
| # dependencies = [ | ||
| # "httpx" | ||
| # ] | ||
| # requires-python = ">=3.12" | ||
| # /// | ||
|
|
||
| import httpx | ||
| print(httpx.get("https://api.github.com/zen").text) | ||
| EOF | ||
| ) | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| --- | ||
| name: typescript-inline-scripts | ||
| description: Guide for running inline TypeScript scripts with Bun | ||
| --- | ||
|
|
||
| ## TypeScript Inline Scripts with Bun | ||
|
|
||
| ### IMPORTANT | ||
|
|
||
| - ALWAYS assume Bun runtime with modern TypeScript features | ||
| - Imported npm packages will be automatically installed by Bun | ||
| - ALWAYS prefer Bun APIs where possible | ||
|
|
||
| ### Example | ||
|
|
||
| ```bash | ||
| bun run --install=fallback - < <(cat <<'EOF' | ||
| import { z } from 'zod' | ||
|
|
||
| console.log(z.coerce.number().parse('5')) | ||
| EOF | ||
| ) | ||
| ``` | ||
|
|
||
| ## Bun APIs Reference | ||
|
|
||
| ### Core Runtime APIs | ||
|
|
||
| - `Bun.spawn()` - Process spawning and management | ||
| - `Bun.file()` - File system operations and reading | ||
| - `Bun.write()` - File writing operations | ||
| - `fetch()` - HTTP requests (Web API standard) | ||
| - `Bun.preconnect()` - URL preconnection for performance | ||
|
|
||
| ### File System | ||
|
|
||
| - `Bun.file(path)` - Create file handle for reading/writing | ||
| - `await Bun.file(path).text()` - Read file as text | ||
| - `await Bun.file(path).json()` - Read file as JSON | ||
| - `await Bun.file(path).arrayBuffer()` - Read file as ArrayBuffer | ||
| - `await Bun.write(path, data)` - Write data to file | ||
|
|
||
| ### Shell Commands | ||
|
|
||
| ```typescript | ||
| import { $ } from 'bun' | ||
| await $`command` // Execute shell commands with template literals | ||
| const result = await $`ls -la` // Capture command output | ||
| ``` | ||
|
|
||
| ### Compression | ||
|
|
||
| - `Bun.gzipSync()` - Synchronous gzip compression | ||
| - `Bun.gunzipSync()` - Synchronous gzip decompression | ||
| - `Bun.inflateSync()` - Synchronous deflate decompression | ||
|
|
||
| ### SQLite | ||
|
|
||
| ```typescript | ||
| import { Database } from 'bun:sqlite' | ||
| // Database operations and SQL execution | ||
| ``` | ||
|
|
||
| ### FFI (Foreign Function Interface) | ||
|
|
||
| ```typescript | ||
| import { dlopen, CString } from 'bun:ffi' | ||
| // Native library interaction | ||
| ``` | ||
|
|
||
| ### Utilities | ||
|
|
||
| - `Bun.escapeHTML()` - HTML escaping | ||
| - `Bun.hash()` - Hashing functions | ||
| - `Bun.password.hash()` - Password hashing | ||
| - `Bun.password.verify()` - Password verification | ||
|
|
||
| ### Node.js Compatibility | ||
|
|
||
| - Full Node.js API support via `node:` imports | ||
| - `import { createRequire } from 'node:module'` | ||
| - All standard Node.js modules available |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| --- | ||
| 'example-worker-echoback': minor | ||
| '@repo/eslint-config': minor | ||
| '@repo/hono-helpers': minor | ||
| --- | ||
|
|
||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@repo/workspace-dependencies': patch | ||
| 'example-worker-echoback': patch | ||
| '@repo/typescript-config': patch | ||
| '@repo/oxlint-config': patch | ||
| '@repo/hono-helpers': patch | ||
| '@repo/turbo-generators': patch | ||
| '@repo/tools': patch | ||
| --- | ||
|
|
||
| chore: migrate from eslint to oxlint | ||
jahands marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| auto-install-peers=true | ||
| public-hoist-pattern[]=*eslint* | ||
| public-hoist-pattern[]=*prettier* | ||
| public-hoist-pattern[]=oxlint | ||
| public-hoist-pattern[]=oxlint-tsgolint |
Uh oh!
There was an error while loading. Please reload this page.