ultracite 7.7.0 → 7.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -12
- package/config/biome/tanstack/biome.jsonc +16 -0
- package/config/eslint/react/eslint.config.mjs +0 -4
- package/config/eslint/tanstack/eslint.config.mjs +34 -0
- package/config/eslint/tanstack/rules/router.mjs +13 -0
- package/config/eslint/tanstack/rules/start.mjs +13 -0
- package/config/oxlint/core/index.mjs +9 -0
- package/config/oxlint/react/index.mjs +6 -0
- package/config/oxlint/tanstack/index.d.mts +5 -0
- package/config/oxlint/tanstack/index.mjs +20 -0
- package/config/oxlint/vitest/index.mjs +1 -0
- package/dist/index.js +69 -72
- package/package.json +20 -19
- package/dist/adal-VMG3GLKT.svg +0 -1
- package/dist/aider-K7JLZT2D.svg +0 -1
- package/dist/amazon-q-TSOJNPXB.svg +0 -1
- package/dist/amp-EV4LVL5I.svg +0 -1
- package/dist/antigravity-JVONECNW.svg +0 -1
- package/dist/augmentcode-Q62PVXKO.svg +0 -1
- package/dist/biome-TVLEY2T4.svg +0 -1
- package/dist/bob-MRQ23J26.svg +0 -1
- package/dist/claude-6DLEHRDQ.svg +0 -1
- package/dist/cline-6HWKIYN7.svg +0 -1
- package/dist/codebuddy-OD3VECQ4.svg +0 -1
- package/dist/coder-7BVXO5OJ.svg +0 -1
- package/dist/codex-NQZ5TJCL.svg +0 -1
- package/dist/continue-LKI2ZW3R.svg +0 -1
- package/dist/copilot-L2IY45R2.svg +0 -1
- package/dist/crush-LYLRDQGZ.svg +0 -1
- package/dist/cursor-GQNH5LCA.svg +0 -1
- package/dist/devin-KY5ISKEW.svg +0 -1
- package/dist/droid-266OHJBT.svg +0 -1
- package/dist/eslint-7IULJKW7.svg +0 -1
- package/dist/firebase-studio-ILLWWYU7.svg +0 -1
- package/dist/firebender-UNO6LSZG.svg +0 -1
- package/dist/gemini-OYS6V4BH.svg +0 -1
- package/dist/goose-XBIEVD4H.svg +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/jules-HJPVWU73.svg +0 -1
- package/dist/junie-RUWBUV6N.svg +0 -1
- package/dist/kilo-code-4QYUYY2E.svg +0 -1
- package/dist/kimi-6SOFW673.svg +0 -1
- package/dist/kiro-N2M256R6.svg +0 -1
- package/dist/langchain-5SXQKAL3.svg +0 -1
- package/dist/lovable-UELF2DY5.svg +0 -1
- package/dist/mcpjam-V2GHUPJN.svg +0 -1
- package/dist/mistral-HQ63EC2B.svg +0 -1
- package/dist/ona-KYYK3HQX.svg +0 -1
- package/dist/open-hands-K5EYKO6T.svg +0 -1
- package/dist/openclaw-XFPF7FMJ.svg +0 -1
- package/dist/opencode-K3274JKQ.svg +0 -1
- package/dist/oxlint-5IE3ABOZ.svg +0 -1
- package/dist/pi-AZOSKO3D.svg +0 -1
- package/dist/prettier-O4V2FSEA.svg +0 -1
- package/dist/qoder-LPW47DKG.svg +0 -1
- package/dist/qwen-N3D5CQYL.svg +0 -1
- package/dist/replit-WKR4Y6HH.svg +0 -1
- package/dist/roo-code-CVLBTS7D.svg +0 -1
- package/dist/snowflake-S3LTTUXJ.svg +0 -1
- package/dist/stylelint-DEBSWZVS.svg +0 -1
- package/dist/trae-RXVCFBOF.svg +0 -1
- package/dist/vercel-27VSITAQ.svg +0 -1
- package/dist/void-NYH3U3BB.svg +0 -1
- package/dist/vscode-DEOUEB65.svg +0 -1
- package/dist/warp-OZKAAQRT.svg +0 -1
- package/dist/windsurf-5T7JOTST.svg +0 -1
- package/dist/zed-SIARPESF.svg +0 -1
- package/dist/zencoder-VTSK5Z7Z.svg +0 -1
- /package/config/eslint/{react → tanstack}/rules/query.mjs +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**A production-grade, zero-configuration preset for ESLint, Biome, and Oxlint.**
|
|
4
4
|
|
|
5
|
-
Ultracite
|
|
5
|
+
Ultracite helps you and your AI models write consistent, type-safe code without the hassle of configuration. Pick your preferred toolchain, run one command, and get hundreds of battle-tested rules wired up in seconds — across single repos and monorepos alike.
|
|
6
6
|
|
|
7
7
|
<div>
|
|
8
8
|
<img src="https://img.shields.io/npm/dy/ultracite" alt="" />
|
|
@@ -16,33 +16,73 @@ Ultracite is designed to help you and your AI models write consistent and type-s
|
|
|
16
16
|
npx ultracite init
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The interactive setup
|
|
20
|
-
|
|
19
|
+
The interactive setup guides you through choosing your formatter/linter, framework, editor, and AI agents, then installs and configures everything for you. Re-run it any time to adjust your setup.
|
|
20
|
+
|
|
21
|
+
> Prefer a different package manager? Ultracite detects yours automatically, or you can run it with `pnpm dlx`, `yarn dlx`, or `bunx`.
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
| Command | Description |
|
|
26
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------- |
|
|
27
|
+
| `ultracite init` | Initialize Ultracite in the current directory (interactive by default). |
|
|
28
|
+
| `ultracite check [files...]` | Lint without writing changes. Unknown flags are passed through to the underlying linter. |
|
|
29
|
+
| `ultracite fix [files...]` | Lint and auto-fix. Unknown flags are passed through to the underlying linter. |
|
|
30
|
+
| `ultracite doctor` | Verify your Ultracite setup and diagnose configuration issues. |
|
|
31
|
+
|
|
32
|
+
`check` and `fix` accept an optional list of files or globs; omit them to run against the whole project. Add `-v` / `--version` or `-h` / `--help` for CLI details.
|
|
33
|
+
|
|
34
|
+
Common `init` flags for non-interactive / CI use:
|
|
35
|
+
|
|
36
|
+
| Flag | Description |
|
|
37
|
+
| ------------------------------ | ------------------------------------------------------------------- |
|
|
38
|
+
| `--linter <linter>` | Toolchain to configure (Biome, ESLint, or Oxlint). |
|
|
39
|
+
| `--pm <pm>` | Package manager to use. |
|
|
40
|
+
| `--editors <editors...>` | Editors to configure (use `universal` for `.vscode/settings.json`). |
|
|
41
|
+
| `--agents <agents...>` | AI agents to enable (use `universal` for `AGENTS.md`). |
|
|
42
|
+
| `--frameworks <frameworks...>` | Frameworks in use, for framework-aware rules. |
|
|
43
|
+
| `--type-aware` | Enable type-aware linting. |
|
|
44
|
+
| `--install-skill` | Install the reusable Ultracite skill after setup. |
|
|
45
|
+
| `--skip-install` | Configure without installing dependencies. |
|
|
46
|
+
| `--quiet` | Suppress interactive prompts (auto-enabled in CI). |
|
|
47
|
+
|
|
48
|
+
See the [CLI reference](https://docs.ultracite.ai/) for the full, current list of options.
|
|
21
49
|
|
|
22
50
|
## Supported Tools
|
|
23
51
|
|
|
24
|
-
- **Biome** — All-in-one formatting and linting
|
|
25
|
-
- **ESLint + Prettier + Stylelint** —
|
|
26
|
-
- **Oxlint + Oxfmt** —
|
|
52
|
+
- **Biome** — All-in-one formatting and linting in a single fast binary.
|
|
53
|
+
- **ESLint + Prettier + Stylelint** — The most mature ecosystem with the largest plugin support.
|
|
54
|
+
- **Oxlint + Oxfmt** — Rust-based tooling that runs dramatically faster than ESLint, part of the Oxc ecosystem.
|
|
27
55
|
|
|
28
56
|
## Key Features
|
|
29
57
|
|
|
30
58
|
### ⚡ Subsecond Performance
|
|
31
59
|
|
|
32
|
-
Built
|
|
60
|
+
Built around Rust-based tooling for near-instant analysis. On-save checks feel seamless and stay out of your way.
|
|
33
61
|
|
|
34
62
|
### 🎯 Zero-Config by Design
|
|
35
63
|
|
|
36
|
-
Hundreds of preconfigured rules
|
|
64
|
+
Hundreds of preconfigured rules tuned for modern JavaScript and TypeScript. It works out of the box, and you can override anything when you need to.
|
|
37
65
|
|
|
38
66
|
### 🤖 AI-Ready
|
|
39
67
|
|
|
40
|
-
Generate
|
|
68
|
+
Generate ruleset and context files for a wide range of AI agents — Claude Code, GitHub Copilot, Cursor, Gemini, and many more — so humans and models share one consistent style.
|
|
41
69
|
|
|
42
70
|
### 🏗️ Monorepo Ready
|
|
43
71
|
|
|
44
|
-
|
|
72
|
+
One unified toolchain configuration across every package and app, eliminating duplicate config files while keeping standards consistent.
|
|
73
|
+
|
|
74
|
+
## Using the presets directly
|
|
75
|
+
|
|
76
|
+
Beyond the CLI, Ultracite publishes ready-made config presets you can extend in your own setup (Biome, ESLint, Oxlint, Oxfmt, Prettier, and Stylelint). `ultracite init` wires these up for you; if you'd rather reference them by hand, the [configuration docs](https://docs.ultracite.ai/) list the exact import paths and extension points for each toolchain.
|
|
77
|
+
|
|
78
|
+
## Documentation
|
|
79
|
+
|
|
80
|
+
Full setup guides, configuration options, rule references, framework and editor integrations, and examples live in the docs:
|
|
81
|
+
|
|
82
|
+
- **Docs:** https://docs.ultracite.ai/
|
|
83
|
+
- **Website:** https://www.ultracite.ai/
|
|
84
|
+
- **Issues & discussions:** https://github.com/haydenbleasel/ultracite
|
|
45
85
|
|
|
46
|
-
|
|
86
|
+
## License
|
|
47
87
|
|
|
48
|
-
|
|
88
|
+
MIT © [Hayden Bleasel](https://github.com/haydenbleasel)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": false,
|
|
3
|
+
"$schema": "../../../node_modules/@biomejs/biome/configuration_schema.json",
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"includes": ["**/routes/**/*.{tsx,ts}", "**/app/routes/**/*.{tsx,ts}"],
|
|
7
|
+
"linter": {
|
|
8
|
+
"rules": {
|
|
9
|
+
"style": {
|
|
10
|
+
"useFilenamingConvention": "off"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
|
|
2
2
|
|
|
3
|
-
import query from "@tanstack/eslint-plugin-query";
|
|
4
3
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
5
4
|
import react from "eslint-plugin-react";
|
|
6
5
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
7
6
|
|
|
8
7
|
import jsxA11yRules from "./rules/jsx-a11y.mjs";
|
|
9
|
-
import queryRules from "./rules/query.mjs";
|
|
10
8
|
import reactHooksRules from "./rules/react-hooks.mjs";
|
|
11
9
|
import reactRules from "./rules/react.mjs";
|
|
12
10
|
|
|
@@ -21,7 +19,6 @@ const config = [
|
|
|
21
19
|
},
|
|
22
20
|
},
|
|
23
21
|
plugins: {
|
|
24
|
-
"@tanstack/query": query,
|
|
25
22
|
"jsx-a11y": jsxA11y,
|
|
26
23
|
react,
|
|
27
24
|
"react-hooks": reactHooks,
|
|
@@ -30,7 +27,6 @@ const config = [
|
|
|
30
27
|
...reactRules,
|
|
31
28
|
...reactHooksRules,
|
|
32
29
|
...jsxA11yRules,
|
|
33
|
-
...queryRules,
|
|
34
30
|
},
|
|
35
31
|
settings: {
|
|
36
32
|
react: {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
|
|
2
|
+
|
|
3
|
+
import query from "@tanstack/eslint-plugin-query";
|
|
4
|
+
import router from "@tanstack/eslint-plugin-router";
|
|
5
|
+
import start from "@tanstack/eslint-plugin-start";
|
|
6
|
+
|
|
7
|
+
import queryRules from "./rules/query.mjs";
|
|
8
|
+
import routerRules from "./rules/router.mjs";
|
|
9
|
+
import startRules from "./rules/start.mjs";
|
|
10
|
+
|
|
11
|
+
const config = [
|
|
12
|
+
{
|
|
13
|
+
files: ["**/*.jsx", "**/*.tsx"],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
parserOptions: {
|
|
16
|
+
ecmaFeatures: {
|
|
17
|
+
jsx: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
plugins: {
|
|
22
|
+
"@tanstack/query": query,
|
|
23
|
+
"@tanstack/router": router,
|
|
24
|
+
"@tanstack/start": start,
|
|
25
|
+
},
|
|
26
|
+
rules: {
|
|
27
|
+
...queryRules,
|
|
28
|
+
...routerRules,
|
|
29
|
+
...startRules,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
export default config;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import pluginRouter from "@tanstack/eslint-plugin-router";
|
|
2
|
+
|
|
3
|
+
const { rules } = pluginRouter;
|
|
4
|
+
|
|
5
|
+
const availableKeys = Object.keys(rules).filter(
|
|
6
|
+
(key) => !rules[key]?.meta?.deprecated
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const baseRules = Object.fromEntries(
|
|
10
|
+
availableKeys.map((key) => [`@tanstack/router/${key}`, "error"])
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default { ...baseRules };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import pluginStart from "@tanstack/eslint-plugin-start";
|
|
2
|
+
|
|
3
|
+
const { rules } = pluginStart;
|
|
4
|
+
|
|
5
|
+
const availableKeys = Object.keys(rules).filter(
|
|
6
|
+
(key) => !rules[key]?.meta?.deprecated
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const baseRules = Object.fromEntries(
|
|
10
|
+
availableKeys.map((key) => [`@tanstack/start/${key}`, "error"])
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default { ...baseRules };
|
|
@@ -61,6 +61,7 @@ export default defineConfig({
|
|
|
61
61
|
"grouped-accessor-pairs": "error",
|
|
62
62
|
"guard-for-in": "error",
|
|
63
63
|
"id-length": "off",
|
|
64
|
+
"id-match": "error",
|
|
64
65
|
"init-declarations": "off",
|
|
65
66
|
"logical-assignment-operators": "error",
|
|
66
67
|
"max-classes-per-file": "error",
|
|
@@ -113,6 +114,8 @@ export default defineConfig({
|
|
|
113
114
|
"no-func-assign": "error",
|
|
114
115
|
"no-global-assign": "error",
|
|
115
116
|
"no-implicit-coercion": "off",
|
|
117
|
+
"no-implicit-globals": "error",
|
|
118
|
+
"no-implied-eval": "error",
|
|
116
119
|
"no-import-assign": "error",
|
|
117
120
|
"no-inline-comments": "error",
|
|
118
121
|
"no-inner-declarations": "error",
|
|
@@ -192,6 +195,7 @@ export default defineConfig({
|
|
|
192
195
|
"no-with": "error",
|
|
193
196
|
"object-shorthand": "error",
|
|
194
197
|
"operator-assignment": "error",
|
|
198
|
+
"prefer-arrow-callback": "error",
|
|
195
199
|
"prefer-const": "error",
|
|
196
200
|
"prefer-destructuring": "error",
|
|
197
201
|
"prefer-exponentiation-operator": "error",
|
|
@@ -199,6 +203,7 @@ export default defineConfig({
|
|
|
199
203
|
"prefer-object-has-own": "error",
|
|
200
204
|
"prefer-object-spread": "error",
|
|
201
205
|
"prefer-promise-reject-errors": "error",
|
|
206
|
+
"prefer-regex-literals": "error",
|
|
202
207
|
"prefer-rest-params": "error",
|
|
203
208
|
"prefer-spread": "error",
|
|
204
209
|
"prefer-template": "error",
|
|
@@ -227,6 +232,7 @@ export default defineConfig({
|
|
|
227
232
|
"import/group-exports": "off",
|
|
228
233
|
"import/max-dependencies": "off",
|
|
229
234
|
"import/namespace": "error",
|
|
235
|
+
"import/newline-after-import": "error",
|
|
230
236
|
"import/no-absolute-path": "error",
|
|
231
237
|
"import/no-amd": "error",
|
|
232
238
|
"import/no-anonymous-default-export": "off",
|
|
@@ -268,7 +274,10 @@ export default defineConfig({
|
|
|
268
274
|
"jsdoc/require-returns": "off",
|
|
269
275
|
"jsdoc/require-returns-description": "error",
|
|
270
276
|
"jsdoc/require-returns-type": "off",
|
|
277
|
+
"jsdoc/require-throws-description": "error",
|
|
278
|
+
"jsdoc/require-throws-type": "error",
|
|
271
279
|
"jsdoc/require-yields": "error",
|
|
280
|
+
"jsdoc/require-yields-type": "error",
|
|
272
281
|
|
|
273
282
|
// ── node ───────────────────────────────────────────────────────────
|
|
274
283
|
"node/global-require": "error",
|
|
@@ -3,8 +3,12 @@ import { defineConfig } from "oxlint";
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
plugins: ["react", "react-perf", "jsx-a11y"],
|
|
5
5
|
rules: {
|
|
6
|
+
"jsx-a11y/control-has-associated-label": "error",
|
|
6
7
|
"jsx-a11y/interactive-supports-focus": "error",
|
|
7
8
|
"jsx-a11y/no-autofocus": "off",
|
|
9
|
+
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
10
|
+
"jsx-a11y/no-noninteractive-element-interactions": "error",
|
|
11
|
+
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
8
12
|
"react-perf/jsx-no-jsx-as-prop": "off",
|
|
9
13
|
"react-perf/jsx-no-new-array-as-prop": "off",
|
|
10
14
|
"react-perf/jsx-no-new-object-as-prop": "off",
|
|
@@ -15,7 +19,9 @@ export default defineConfig({
|
|
|
15
19
|
"react/jsx-props-no-spreading": "off",
|
|
16
20
|
|
|
17
21
|
"react/no-multi-comp": "off",
|
|
22
|
+
"react/no-object-type-as-default-prop": "error",
|
|
18
23
|
"react/no-unknown-property": "off",
|
|
24
|
+
"react/no-unstable-nested-components": "error",
|
|
19
25
|
"react/only-export-components": "off",
|
|
20
26
|
|
|
21
27
|
"react/react-in-jsx-scope": "off",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from "oxlint";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
overrides: [
|
|
5
|
+
{
|
|
6
|
+
files: ["**/routes/**/*.{tsx,ts}", "**/app/routes/**/*.{tsx,ts}"],
|
|
7
|
+
rules: {
|
|
8
|
+
"unicorn/filename-case": "off",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
files: ["**/routeTree.gen.ts"],
|
|
13
|
+
rules: {
|
|
14
|
+
"unicorn/filename-case": "off",
|
|
15
|
+
"unicorn/no-abusive-eslint-disable": "off",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
rules: {},
|
|
20
|
+
});
|
|
@@ -34,6 +34,7 @@ export default defineConfig({
|
|
|
34
34
|
"vitest/no-test-prefixes": "error",
|
|
35
35
|
"vitest/no-test-return-statement": "error",
|
|
36
36
|
"vitest/no-unneeded-async-expect-function": "error",
|
|
37
|
+
"vitest/padding-around-after-all-blocks": "error",
|
|
37
38
|
"vitest/prefer-called-exactly-once-with": "error",
|
|
38
39
|
"vitest/prefer-called-once": "error",
|
|
39
40
|
"vitest/prefer-called-with": "error",
|