Skip to content
Open
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
36 changes: 0 additions & 36 deletions .oxlintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

106 changes: 106 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import { defineConfig } from "oxlint";
import coreConfig from "ultracite/oxlint/core";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add JSON import attribute for ultracite core config

Importing ultracite/oxlint/core as a bare ESM import can break linting because that subpath resolves to a JSON config file, and Node requires a JSON import attribute. In this state, ultracite check/oxlint can fail at config load time with ERR_IMPORT_ATTRIBUTE_MISSING, which blocks the repository’s pnpm check workflow before any lint rules run.

Useful? React with 👍 / 👎.


export default defineConfig({
extends: [coreConfig],
ignorePatterns: ["example/**"],
rules: {
"func-style": "off",
"sort-keys": "off",
"no-shadow": "off",
"no-use-before-define": "off",
"no-promise-executor-return": "off",
"import/no-relative-parent-imports": "off",
"import/first": "off",
"promise/prefer-await-to-then": "off",
"promise/prefer-await-to-callbacks": "off",
"promise/avoid-new": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-await-expression-member": "off",
"typescript/consistent-type-imports": "off",
},
overrides: [
{
files: [
"**/*.{test,spec}.{ts,tsx,js,jsx}",
"**/__tests__/**/*.{ts,tsx,js,jsx}",
"test/**/*.{ts,tsx,js,jsx}",
],
plugins: ["vitest"],
rules: {
"vitest/consistent-each-for": "error",
"vitest/consistent-test-filename": "error",
"vitest/consistent-vitest-vi": "error",
"vitest/expect-expect": "error",
"vitest/hoisted-apis-on-top": "error",
"vitest/no-alias-methods": "error",
"vitest/no-commented-out-tests": "error",
"vitest/no-conditional-expect": "error",
"vitest/no-conditional-tests": "error",
"vitest/no-disabled-tests": "error",
"vitest/no-duplicate-hooks": "error",
"vitest/no-focused-tests": "error",
"vitest/no-identical-title": "error",
"vitest/no-import-node-test": "error",
"vitest/no-interpolation-in-snapshots": "error",
"vitest/no-large-snapshots": "error",
"vitest/no-mocks-import": "error",
"vitest/no-restricted-matchers": "error",
"vitest/no-restricted-vi-methods": "error",
"vitest/no-standalone-expect": "error",
"vitest/no-test-prefixes": "error",
"vitest/no-test-return-statement": "error",
"vitest/prefer-called-exactly-once-with": "error",
"vitest/prefer-called-once": "error",
"vitest/prefer-called-with": "error",
"vitest/prefer-comparison-matcher": "error",
"vitest/prefer-describe-function-title": "error",
"vitest/prefer-each": "error",
"vitest/prefer-equality-matcher": "error",
"vitest/prefer-expect-resolves": "error",
"vitest/prefer-expect-type-of": "error",
"vitest/prefer-hooks-in-order": "error",
"vitest/prefer-hooks-on-top": "error",
"vitest/prefer-import-in-mock": "error",
"vitest/prefer-mock-promise-shorthand": "error",
"vitest/prefer-spy-on": "error",
"vitest/prefer-strict-equal": "error",
"vitest/prefer-to-be": "error",
"vitest/prefer-to-be-falsy": "error",
"vitest/prefer-to-be-object": "error",
"vitest/prefer-to-be-truthy": "error",
"vitest/prefer-to-contain": "error",
"vitest/prefer-to-have-length": "error",
"vitest/prefer-todo": "error",
"vitest/require-awaited-expect-poll": "error",
"vitest/require-local-test-context-for-concurrent-snapshots": "error",
"vitest/require-mock-type-parameters": "error",
"vitest/require-to-throw-message": "error",
"vitest/require-top-level-describe": "error",
"vitest/valid-describe-callback": "error",
"vitest/valid-expect": "error",
"vitest/valid-expect-in-promise": "error",
"vitest/warn-todo": "error",
// conflicts with prefer-describe-function-title
"vitest/valid-title": "off",
// mock callbacks often need empty functions
"no-empty-function": "off",
// mock factories use Promise.resolve/reject
"promise/prefer-await-to-then": "off",
// conflicts with prefer-describe-function-title
"vitest/prefer-lowercase-title": "off",
// conflicts with prefer-to-be-truthy and prefer-to-be-falsy
"vitest/prefer-strict-boolean-matchers": "off",
// conflicts with prefer-called-once
"vitest/prefer-called-times": "off",
// project uses vitest globals: true
"vitest/prefer-importing-vitest-globals": "off",
"vitest/no-importing-vitest-globals": "off",
// too strict for general use
"vitest/require-test-timeout": "off",
// original project override
"jest/prefer-called-with": "off",
},
},
],
});
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@
"version-packages": "changeset version"
},
"dependencies": {
"@clack/prompts": "1.2.0",
"@clack/prompts": "1.3.0",
"citty": "0.2.2",
"picocolors": "1.1.1",
"tinyglobby": "0.2.15",
"tinyglobby": "0.2.16",
"yaml": "2.8.3"
},
"devDependencies": {
"@changesets/cli": "2.30.0",
"@types/node": "24.12.2",
"@typescript/native-preview": "7.0.0-dev.20260406.1",
"@vitest/coverage-v8": "4.1.2",
"@changesets/cli": "2.31.0",
"@types/node": "25.6.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The @types/node version (25.6.0) is ahead of the minimum supported Node.js version (>=24.14.0) specified in the engines field. This mismatch can lead to the use of APIs that are available in the type definitions but missing in the target runtime, potentially causing runtime errors that the compiler will not catch. It is recommended to keep @types/node aligned with the major version of the minimum supported Node.js environment. Additionally, ensure that .node-versions is used for exact pinning while the engines field in package.json uses a less restrictive SemVer range for broader compatibility.

Suggested change
"@types/node": "25.6.0",
"@types/node": "24.12.2",
References
  1. For Node.js versioning, use .node-versions for exact pinning and a less restrictive SemVer range in package.json's engines field for broader compatibility.

"@typescript/native-preview": "7.0.0-dev.20260430.1",
"@vitest/coverage-v8": "4.1.5",
"fs-fixture": "2.13.0",
"knip": "6.3.0",
"lefthook": "2.1.5",
"knip": "6.9.0",
"lefthook": "2.1.6",
"marked-man": "2.1.0",
"oxfmt": "latest",
"oxlint": "latest",
"tsdown": "0.21.7",
"tuistory": "0.0.16",
"ultracite": "7.4.3",
"vitest": "4.1.2"
"tsdown": "0.21.10",
"tuistory": "0.3.0",
"ultracite": "7.6.2",
"vitest": "4.1.5"
},
"engines": {
"node": ">=24.14.0",
Expand Down
Loading
Loading