ultracite@8.3.0
Minor Changes
-
247352f: Add an opt-in
ultracite/oxlint/landminespreset for@interfere/landmines, Oxlint rules for the shortcuts a coding agent takes to get a green check. All ten rules run aterror:no-test-doubles,strict-msw,no-fixed-sleep,no-unsignaled-pollandno-flake-maskingfor tests, plusno-comments,colocated-tests,test-file-names,package-exportsandno-explicit-return-types. Enable it withultracite init --linter oxlint --js-plugins @interfere/landmines, or extend it alongsideultracite/oxlint/coreafter installing@interfere/landmines.doctorandupgradecheck and reinstall the package for configs that load it.The preset is Oxlint-only. Its
no-commentsrule rejects theSAFETY:comment thatanti-slop/require-safety-comment-for-type-assertionrequires (interfere-inc/landmines#4), so turn one of the two off when extending both presets.
Patch Changes
- f23eb8e:
ultracite fix --claudeandfix --codexnow give the agent the rule description and documentation link forjsdoc-js/*andtsdoc/*diagnostics on Oxlint. Oxlint’s report has neither for a rule that comes from a JS plugin, so Ultracite reads them from the plugin, but only did so foreslint-plugin-github,eslint-plugin-sonarjsandoxlint-plugin-react-doctor. The two documentation plugins were left with the one-line message alone. - 39577c0: Running
ultracite initagain no longer rewrites an.aider.conf.ymlthat already has Ultracite’s settings. The file was re-serialised even when nothing needed changing, which normalised its spacing (read: [AGENTS.md]becameread: [ AGENTS.md ], and aligned comments moved) and listed it as updated. It is now left exactly as written unless a key changes. - d0219d3:
ultracite fix --claudeandfix --codexon Biome now askbiome explainabout each rule once. A rule Biome couldn’t describe was not remembered, sobiome explainran again for every diagnostic of that rule, which slowed down a run with many of them. - 9b94a7a:
ultracite doctornow gives the right advice when a.oxlintrc.jsoncor.oxfmtrc.jsoncsits next to the TypeScript config. It told you to delete one of the two files, where for a.jsonfile it says to runultracite init, which migrates the JSON config into the TypeScript one.initmigrates.jsoncfiles the same way, sodoctornow says so. When three config files are present, the message also reads “are all present” instead of “are both present”. - 88f51b2: In a monorepo on the ESLint provider,
ultracite initnow gives a workspace config its framework’s type-aware add-on when the rooteslint.config.*importsultracite/eslint/type-awarewith single quotes. Only a double-quoted import was recognised, so after a formatter rewrote the root config with single quotes, a new workspace config was written withoutultracite/eslint/<framework>/type-aware. - 984ef22:
ultracite initno longer reformatspackage.jsonwhen it updates alint-stagedconfig stored there. The file was written back with two-space indentation and LF line endings, so a tab-indented or CRLFpackage.jsoncame back with every line changed. It now keeps the file’s own indentation and line endings, as the otherpackage.jsoneditsinitmakes already do. - b21013f:
ultracite initno longer writes a duplicate key intooxlint.config.tswhen the key it is checking for is quoted or has a comment on the line above. Two cases were affected. With--type-aware, a config whose ownoptionssat under a comment got a secondoptions: { typeAware: true }ahead of it, which the project’soptionsthen overrode, so type-aware linting stayed off without the usual notice. And when a leftover.oxlintrc.jsonwas migrated, a key such as"rules"that the TypeScript config already set was added again from the JSON file, where it took precedence. Both now compare the parsed key, so the config’s own value is kept. - 3c0aef1: On Oxlint,
ultracite checkandultracite fixno longer fail when given a file Oxlint doesn’t lint whose path contains glob characters, such asapp/[slug]/styles.cssorapp/[slug]/data.json. The path was taken for a glob and passed to Oxlint, which exited 1 with “No files found to lint”. That broke lint-staged and editor hooks whenever the only changed file was a stylesheet, JSON or Markdown file inside a Next.js dynamic route folder. A path that exists on disk is now treated as a file, and Oxlint is skipped for it as it is for any other file it doesn’t lint. - ab7aca8:
ultracite init,doctorandupgradenow read an Oxlint JS plugin selection written with single quotes, such asselectJsPlugins(['sonarjs', 'github']). Only double-quoted names were recognised, so in a project whose formatter uses single quotes the selection read as empty: runninginitagain removed the JS plugins fromoxlint.config.ts, anddoctorandupgradeskipped their packages. A legacy config with single-quoted preset names in a stringextendsarray is read the same way. - 7d81f39: The rules
ultracite initwrites toAGENTS.md,CLAUDE.mdand the other agent rules files now pass the formatter it sets up. The “Framework-Specific Guidance” section had no blank line between each bold label and the list under it, which Oxfmt and Prettier both reformat, soultracite checkfailed on a freshly written rules file, and runninginitagain undid whatultracite fixhad changed. Runultracite initagain to pick up the corrected block. - 4a32ea7: On the ESLint provider,
ultracite checkandultracite fixnow run Stylelint when the target is a quoted glob that isn’t limited to stylesheets, such as"src/**"or"**/*.{css,ts}". A glob with no extension was treated as a directory name and its wildcards escaped, and a glob ending in a non-style extension was dropped, so Stylelint matched nothing and the stylesheets went unlinted without a message. Those globs are now expanded and their.css,.scssand.lessfiles passed to Stylelint. Directories, single files and globs that already name a style extension behave as before. - c4c756e:
ultracite upgradeno longer reinstallsstorybookin an ESLint project that uses Storybook without thestorybookpreset.storybookis in the list of packages the preset installs becauseeslint-plugin-storybookneeds it as a peer, andupgradereinstalls every listed package the project already has, so a project on an older Storybook major had it moved to the version Ultracite pins. It is now reinstalled only when the config importsultracite/eslint/storybookor the project haseslint-plugin-storybook. - 3748eda:
ultracite initno longer refuses to write into a directory whose name starts with two dots, such as..apps. The check that keeps writes inside the project treated any relative path beginning with..as leaving it, soinitstopped with “Refusing to write outside project”. Only a leading..path segment is rejected now.