Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ set -eu
repo_root="$(git rev-parse --show-toplevel)"
cd "$repo_root"

echo "pre-commit: running lint autofix"
npm run lint:fix

echo "pre-commit: running formatter"
npm run format

git add -A -- src
echo "pre-commit: formatting and linting staged files"
npm run lint:staged
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ jobs:
runs-on: ${{ matrix.settings.host }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 20

Expand All @@ -76,7 +76,7 @@ jobs:
run: ${{ matrix.settings.build }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bindings-${{ matrix.settings.target }}
path: rust/*.node
Expand All @@ -102,10 +102,10 @@ jobs:
- target: x86_64-pc-windows-msvc

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
run: npm ci

- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: bindings-${{ matrix.settings.target }}
path: artifacts
Expand Down Expand Up @@ -167,10 +167,10 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: package.json
cache: npm
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -45,7 +45,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust dependencies
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
~/.cargo/bin/
Expand Down Expand Up @@ -84,10 +84,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 20
cache: 'npm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wreq-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: package.json
cache: npm
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Create pull request
if: steps.changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
uses: peter-evans/create-pull-request@v8
with:
branch: chore/update-wreq-upstream
delete-branch: true
Expand Down
7 changes: 6 additions & 1 deletion .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"sortPackageJson": false,
"sortImports": {
"groups": [["type"], ["external"], ["builtin"], ["parent", "sibling"], "index"],
"sortSideEffects": true,
"newlinesBetween": false
},
"ignorePatterns": [
"**/dist/**",
"**/node_modules/**",
"**/.release/**",
"**/.release-stubs/**",
"**/.tmp-release/**",
"**/artifacts/**"
],
"semi": true,
"trailingComma": "es5",
Expand All @@ -16,4 +21,4 @@
"tabWidth": 2,
"printWidth": 100,
"endOfLine": "lf"
}
}
159 changes: 141 additions & 18 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,164 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "import", "unicorn"],
"jsPlugins": [
{
"name": "stylistic",
"specifier": "@stylistic/eslint-plugin"
}
],
"categories": {
"correctness": "error",
"suspicious": "warn"
},
"env": {
"browser": true,
"node": true,
"es2022": true
},
"ignorePatterns": [
"**/dist/**",
"**/node_modules/**",
"**/.release/**",
"**/.release-stubs/**",
"**/.tmp-release/**",
"**/artifacts/**",
"**/src/generated/**",
"**/src/config/generated/**"
],
"rules": {
"curly": ["error", "all"],
"eqeqeq": ["error", "always", { "null": "ignore" }],
"import-x/no-duplicates": "warn",
"import/no-unassigned-import": "off",
"no-debugger": "error",
"no-eval": "error",
"no-implied-eval": "error",
"no-new-func": "error",
"no-underscore-dangle": "off",
"no-var": "error",
"prefer-const": "error",
"radix": "error",
"stylistic/padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": [
"const",
"let",
"var"
],
"prev": ["const", "let", "var"],
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "return"
"next": ["const", "let", "var"]
},
{
"blankLine": "any",
"prev": [
"const",
"let",
"var"
],
"next": [
"const",
"let",
"var"
]
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"]
},
{
"blankLine": "always",
"prev": "*",
"next": "block-like"
},
{
"blankLine": "always",
"prev": "block-like",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": {
"selector": "ExpressionStatement[expression.type='AwaitExpression']"
}
},
{
"blankLine": "never",
"prev": {
"selector": "ExpressionStatement[expression.type='AwaitExpression']"
},
"next": {
"selector": "ExpressionStatement[expression.type='AwaitExpression']"
}
},
{
"blankLine": "always",
"prev": {
"selector": "ExpressionStatement[expression.type='AwaitExpression']"
},
"next": {
"selector": "ExpressionStatement[expression.type='AwaitExpression']",
"lineMode": "multiline"
}
},
{
"blankLine": "always",
"prev": {
"selector": "ExpressionStatement[expression.type='AwaitExpression']",
"lineMode": "multiline"
},
"next": {
"selector": "ExpressionStatement[expression.type='AwaitExpression']"
}
},
{
"blankLine": "always",
"prev": {
"selector": ":not(ImportDeclaration)",
"lineMode": "multiline"
},
"next": "*"
},
{
"blankLine": "always",
"prev": {
"selector": "ImportDeclaration"
},
"next": {
"selector": ":not(ImportDeclaration)"
}
},
{
"blankLine": "always",
"prev": "*",
"next": "return"
}
]
}
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"unicorn/filename-case": [
"error",
{
"cases": {
"camelCase": true,
"kebabCase": true,
"pascalCase": true
}
}
],
"unicorn/prefer-node-protocol": "error"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
"rules": {
"no-undef": "off"
}
},
{
"files": ["src/native/binding.ts", "scripts/generate-browser-profiles.mjs"],
"rules": {
"@typescript-eslint/no-require-imports": "off"
}
}
]
}
Loading