Repository navigation
feat(vis): add an rslint adapter to vis lint, and fix workspace root and scope - #42
Merged
Merged
Conversation
`vis lint` runs rslint when the project has an rslint config. Detection requires the config file, not just the `@rslint/core` dependency: rslint exits 1 with "no rslint config found" without one, so a dependency alone would make every run fail. Findings are parsed from rslint's jsonline output, one object per line. A warning's severity is "warn", mapped to warning. Non-JSON lines are skipped. Paths are resolved against the workspace. A non-zero exit with no findings (such as a broken config) becomes an error finding with the first stderr line, so a crashed linter does not print "no findings". The config is loaded from rslint.config.ts, .js, .mjs, or .mts. .cjs is not loaded by rslint, so it is not detected. The rslint target inference no longer uses the dependency as a fallback, for the same reason. The committed config schema was also regenerated. It had drifted after the `check` to `outdated` comment change in the security config. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…d, pack, and preview to it Root detection took the nearest lockfile as the monorepo root. A package with its own lockfile was mistaken for the root, and a declared workspace without a lockfile was not found. The root is now the nearest ancestor that declares a workspace (pnpm-workspace.yaml or package.json `workspaces`), with the lockfile finder as the fallback. `vis dev`, `vis build`, `vis pack`, and `vis preview` run from a package directory now select that package (`~:<target>`). From the workspace root, or with --filter or --projects, they select across the workspace as before. The packem config the pack offer writes sets `failOnWarn: false`, so package.json metadata warnings (exports, engines, sideEffects) print without failing the build. tsdown does the same: its package.json checks are opt-in, and it builds ESM from src/index.ts with no config. The `vis env pin` tip pointed at a command that does not exist. It now names `vis toolchain pin`. The readJsonFileSafe generic is justified in a comment rather than flagged. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Thank you for following the naming conventions! 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vis lintruns rslint when a project has an rslint config. Findings come from rslint's jsonline output. Warnings map to warning severity, and paths resolve against the workspace.@rslint/coredependency. Rslint exits 1 without one, so a dependency alone would make every run fail. The rslint inference target follows the same rule.pnpm-workspace.yamlorworkspaces). The lockfile finder is the fallback. Before, a package with its own lockfile was taken as the root, and a declared workspace without a lockfile was not found.vis dev,vis build,vis pack, andvis previewrun from a package directory select that package. From the root, or with--filteror--projects, they select across the workspace as before.failOnWarn: false, so package.json metadata warnings print without failing the build.Stack
This PR is the top of a three-PR stack:
main)The diff here shows only the rslint adapter, the workspace root fix, and the scoping fix on top of #35.
Notes
--type-check. TypeScript errors are reported by the typecheck adapter, which is opt-in.Testing
@rslint/core0.9.5: findings, a warning, a multi-file run, junk lines, a crash, and dependency-only detection.vis lintfails with the finding on a violation, passes on a clean project, and reports a broken config as an error.vis packfrom a package builds only that package. From the root it builds the whole workspace, and packem exits 0 with its warnings printed.🤖 Generated with Claude Code