-
Notifications
You must be signed in to change notification settings - Fork 2
release v2.0.0 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughMigrates the codebase to ESM and raises Node engine requirements; removes getSourceCode/getNodeContent helpers and related tests; updates rules and utils to call context.sourceCode.getText(...) directly; reconfigures Vite to build an ES module library and updates DTS handling and config files. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant ESLint as ESLint
participant Rule as Rule (no-negated-*)
participant Utils as Utils (transform/*)
participant SC as context.sourceCode
ESLint->>Rule: create rule with context
Rule->>SC: context.sourceCode.getText(node)
Rule->>Utils: transform(node, context)
Utils->>SC: context.sourceCode.getText(subNode)
Utils-->>Rule: transformed text / decision
Rule-->>ESLint: report + fixer (uses replaced text)
note right of SC#f8f5e6: Direct context.sourceCode usage replaces removed helpers
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests✅ Unit Test PR creation complete.
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🔇 Additional comments (2)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 25 23 -2
Lines 598 574 -24
Branches 130 125 -5
=========================================
- Hits 598 574 -24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (6)
rules/no-negated-disjunction.ts (1)
38-38: Prefer a typed, ESLint-8-compatible SourceCode access (avoid future breakage).Using
context.sourceCode.getText(node)assumes ESLint ≥9 at runtime. Your peerDep still allows ESLint 8, which will be undefined at runtime. Also, typing is looser here, which can trigger@typescript-eslint/no-unsafe-argumentdepending on your config. Use a typed fallback togetSourceCode()and cast the node to ESLint’s AST node type.Apply this diff in-place:
- let originalExpression = context.sourceCode.getText(node) + // Support ESLint v8 (getSourceCode) and v9 (sourceCode) + const sourceCode = + 'sourceCode' in context && (context as any).sourceCode + ? (context as any).sourceCode + : context.getSourceCode() + // Cast to ESLint AST node to satisfy types + let originalExpression = sourceCode.getText(node as unknown as import('eslint').AST.Node)Add the missing type import at the top (outside this hunk):
import type { AST } from 'eslint'Verification ideas:
- Run tests on ESLint 8 and 9 to ensure no runtime error:
context.sourceCodeis undefined on 8.- Ensure your TS config/lints don’t flag
no-unsafe-argumentafter the cast.package.json (1)
14-14: ESM switch: double-check Node-only scripts that userequire(...).With
"type": "module", most Node REPL/node -pusages still allowrequire, but this can be environment-dependent. Your release scripts use:
node -p "require('./package.json').version"If your CI shell happens to run the snippet under pure ESM semantics, this could fail. Consider a resilient alternative:
- "release:git:commit": "git commit -m \"build: publish v$(node -p \"require('./package.json').version\")\"", - "release:git:push": "git push --follow-tags && git push origin v$(node -p \"require('./package.json').version\")", - "release:git:tag": "git tag v$(node -p \"require('./package.json').version\")", + "release:git:commit": "git commit -m \"build: publish v$(node -p \"JSON.parse(require('node:fs').readFileSync('./package.json','utf8')).version\")\"", + "release:git:push": "git push --follow-tags && git push origin v$(node -p \"JSON.parse(require('node:fs').readFileSync('./package.json','utf8')).version\")", + "release:git:tag": "git tag v$(node -p \"JSON.parse(require('node:fs').readFileSync('./package.json','utf8')).version\")",Or switch to
jqif available in CI. Please verify in your pipeline.utils/transform.ts (1)
99-103: Optional micro-optimization: avoid building RegExp when not needed.In strictly formatted codepaths (no comments/extra spaces), you already skip
transformWithFormatting. For the formatting branch, the RegExp rebuild is fine, but if perf ever matters, consider caching the escaped operator per run or using a tiny inlined replace for&&/||.test/utils/is-pure-group.test.ts (1)
23-25: Future-proof the stub with atextfield (optional).Some utils (e.g.,
transformWithFormatting) requiresourceCode.text. Consider adding it to the stub to reduce friction if tests expand.let fakeContext: Rule.RuleContext = { sourceCode: { - getText: () => currentCode, + getText: () => currentCode, + text: currentCode, }, } as Rule.RuleContextutils/is-pure-group.ts (1)
30-36: Type-safety and lint: avoid unsafe getText overload; slice from full source via rangeTwo improvements:
- Declare the file text as
stringto avoidno-unsafe-assignmenton Line 31.- Avoid passing an AST node to
getText(which triggersno-unsafe-argument); instead, slice from the full program text usingoutermostNode.range.Apply this diff:
- let sourceCode = context.sourceCode.getText() + const programText: string = context.sourceCode.getText() let outermostNode = findOutermostParenthesizedNode( node as ParentedNode, - sourceCode, + programText, ) - let fullCode = context.sourceCode.getText(outermostNode) + const [start, end] = outermostNode.range as [number, number] + const fullCode = programText.slice(start, end)If you prefer not to rely on
range, you can castoutermostNodeto the parser’s node type expected by ESLint’sSourceCode#getText, but slicing avoids the cross-type friction entirely.Run the linter locally to confirm the warnings are gone.
utils/toggle-negation.ts (1)
77-79: Reduce TS-ESLint “unsafe” diagnostics by slicing fromSourceCode.textinstead ofgetText(node)Current calls to
context.sourceCode.getText(nodeOrSubnode)are flagged withno-unsafe-argument/no-unsafe-member-accessin several places. Use the full program text plus node ranges to construct substrings; behavior is the same and avoids typing friction across parser node types.Apply this diff:
function toggleBinaryExpression( node: BinaryExpression, context: Rule.RuleContext, ): string { - let left = context.sourceCode.getText(node.left).trim() - let right = context.sourceCode.getText(node.right).trim() + const programText: string = context.sourceCode.getText() + type Ranged<T> = T & { range: [number, number] } + const [lStart, lEnd] = (node.left as Ranged<Expression>).range + const [rStart, rEnd] = (node.right as Ranged<Expression>).range + let left = programText.slice(lStart, lEnd).trim() + let right = programText.slice(rStart, rEnd).trim()function toggleLogicalExpression( node: LogicalExpression, context: Rule.RuleContext, ): string { - let content = context.sourceCode.getText(node).trim() + const programText: string = context.sourceCode.getText() + type Ranged<T> = T & { range: [number, number] } + const [start, end] = (node as Ranged<LogicalExpression>).range + let content = programText.slice(start, end).trim() return toggleCode(parenthesize(content)) }function toggleUnaryExpression( node: Expression, context: Rule.RuleContext, ): string { - let content = context.sourceCode.getText(node).trim() + const programText: string = context.sourceCode.getText() + type Ranged<T> = T & { range: [number, number] } + const [start, end] = (node as Ranged<Expression>).range + let content = programText.slice(start, end).trim() return toggleCode(content) }Notes:
rangeis already assumed by other utilities in this repo; using it consistently here keeps behavior aligned.- This also prevents future breakage if the parser’s node type for
getTextdiverges from rawestreetypes.Please run the linter to confirm these warnings clear without behavior change in tests.
Also applies to: 119-121, 138-140
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (14)
package.json(2 hunks)rules/no-negated-conjunction.ts(1 hunks)rules/no-negated-disjunction.ts(1 hunks)test/utils/get-node-content.test.ts(0 hunks)test/utils/get-source-code.test.ts(0 hunks)test/utils/is-pure-group.test.ts(1 hunks)test/utils/transform.test.ts(0 hunks)utils/get-node-content.ts(0 hunks)utils/get-source-code.ts(0 hunks)utils/has-negation-inside-parens.ts(1 hunks)utils/is-pure-group.ts(1 hunks)utils/toggle-negation.ts(3 hunks)utils/transform.ts(2 hunks)vite.config.ts(1 hunks)
💤 Files with no reviewable changes (5)
- utils/get-source-code.ts
- test/utils/transform.test.ts
- utils/get-node-content.ts
- test/utils/get-node-content.test.ts
- test/utils/get-source-code.test.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
utils/is-pure-group.ts (1)
utils/find-outermost-parenthesized-node.ts (1)
findOutermostParenthesizedNode(20-41)
🪛 ESLint
utils/is-pure-group.ts
[error] 31-34: Unsafe assignment of an error typed value.
(typescript/no-unsafe-assignment)
[error] 35-35: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
utils/transform.ts
[error] 88-88: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
rules/no-negated-conjunction.ts
[error] 40-40: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
utils/has-negation-inside-parens.ts
[error] 22-22: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
utils/toggle-negation.ts
[error] 77-77: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
[error] 77-77: Unsafe member access .left on an error typed value.
(typescript/no-unsafe-member-access)
[error] 78-78: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
[error] 78-78: Unsafe member access .right on an error typed value.
(typescript/no-unsafe-member-access)
[error] 119-119: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
[error] 138-138: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
vite.config.ts
[error] 23-23: Unsafe call of a(n) error type typed value.
(typescript/no-unsafe-call)
🔇 Additional comments (2)
test/utils/is-pure-group.test.ts (1)
23-25: LGTM. Minimal SourceCode stub aligns with new API.The switch to
fakeContext.sourceCode.getText()looks good and keeps tests focused.utils/has-negation-inside-parens.ts (1)
22-24: Action Required: Verify full-file text is needed for correct parenthesis detectionBefore merging, please confirm that
findOutermostParenthesizedNodeindeed relies on absolute character ranges within the entire source file—and that passing only the node’s sliced text will break its logic. Specifically:
- Inspect
utils/has-negation-inside-parens.tsand the implementation offindOutermostParenthesizedNode. Ensure it uses the node’srangeindices against the full file text, not a substring.- Confirm that
context.sourceCode.getText()(no arguments) returns the entire file’s text, whereasgetText(node)returns only the node slice.If verified, apply this change:
- let sourceCode = context.sourceCode.getText(node) - let outermostNode = findOutermostParenthesizedNode(node, sourceCode) + const fileText: string = context.sourceCode.getText() + const outermostNode = findOutermostParenthesizedNode(node, fileText)And add or retain tests covering cases where the negation isn’t at position 0 (e.g.
const x = 0; if (!(a && !b)) {}) to validate absolute‐range detection.
| }, | ||
| "engines": { | ||
| "node": "^18.0.0 || >=20.0.0" | ||
| "node": "^20.0.0 || >=22.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peer dep range is inconsistent with code requiring ESLint v9 APIs.
You now rely on context.sourceCode (ESLint ≥9). Declaring "eslint": ">=8.0.0" in peerDependencies will break users on ESLint 8 at runtime. Either:
- Raise the peer range to
>=9.0.0, or - Keep support for ESLint 8 by using a safe fallback to
getSourceCode()everywhere (see my code suggestions in the rules and utils).
Proposed fix:
"peerDependencies": {
- "eslint": ">=8.0.0"
+ "eslint": ">=9.0.0"
},Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In package.json around line 84, the peerDependencies entry for eslint ("eslint":
">=8.0.0") is incorrect because the code uses ESLint v9 APIs
(context.sourceCode); update the peer dependency to require ESLint v9 by
changing the range to ">=9.0.0" (or alternatively implement backward-compatible
fallbacks to getSourceCode() throughout the codebase if you must support ESLint
8) so consumers with ESLint 8 won't break at runtime.
|
|
||
| if (fixedExpression) { | ||
| let originalExpression = getNodeContent(node, context) | ||
| let originalExpression = context.sourceCode.getText(node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Fix the @typescript-eslint/no-unsafe-argument and keep ESLint 8/9 compatibility.
The static analysis hint points here. Root causes:
context.sourceCodeis only present in ESLint ≥9.- Type mismatch between Estree nodes and ESLint’s
AST.NodeforgetText.
Adopt a typed fallback and cast to ESLint’s AST node.
Apply this diff:
- let originalExpression = context.sourceCode.getText(node)
+ // ESLint v9 has `context.sourceCode`; ESLint v8 relies on `getSourceCode()`
+ const sourceCode =
+ 'sourceCode' in context && (context as any).sourceCode
+ ? (context as any).sourceCode
+ : context.getSourceCode()
+ let originalExpression = sourceCode.getText(node as unknown as import('eslint').AST.Node)Add the missing type import at the top (outside this hunk):
import type { AST } from 'eslint'🧰 Tools
🪛 ESLint
[error] 40-40: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
🤖 Prompt for AI Agents
In rules/no-negated-conjunction.ts around line 40, context.sourceCode usage
causes a @typescript-eslint/no-unsafe-argument and breaks ESLint 8/9
compatibility; add the missing type import "import type { AST } from 'eslint'"
at the top, obtain the sourceCode with a backwards-compatible fallback (use
context.getSourceCode() when available, otherwise context.sourceCode), and call
getText passing a properly cast node (e.g. node as unknown as AST.Node) so the
argument is correctly typed.
| } | ||
|
|
||
| let originalText = getNodeContent(argument, context) | ||
| let originalText = context.sourceCode.getText(argument) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Harden SourceCode retrieval and satisfy TS linting (no-unsafe-argument).
Two spots:
- Line 88:
context.sourceCode.getText(argument)will fail on ESLint 8 and is flagged by TS lints. - Line 118:
let { sourceCode } = contexthas the same ESLint 8 risk and loose typing.
Adopt a typed fallback and cast nodes to ESLint’s AST type.
Apply this diff for Line 88:
- let originalText = context.sourceCode.getText(argument)
+ const sourceCode =
+ 'sourceCode' in context && (context as any).sourceCode
+ ? (context as any).sourceCode
+ : context.getSourceCode()
+ let originalText = sourceCode.getText(argument as unknown as import('eslint').AST.Node)Apply this diff for Line 118:
- let { sourceCode } = context
+ const sourceCode =
+ 'sourceCode' in context && (context as any).sourceCode
+ ? (context as any).sourceCode
+ : context.getSourceCode()Also add the missing type import at the top (outside this hunk):
import type { AST } from 'eslint'Also applies to: 118-118
🧰 Tools
🪛 ESLint
[error] 88-88: Unsafe argument of type error typed assigned to a parameter of type Node | undefined.
(typescript/no-unsafe-argument)
🤖 Prompt for AI Agents
In utils/transform.ts around line 88 and line 118, replace direct uses of
context.sourceCode/getText that cause unsafe-argument linting by obtaining
SourceCode via context.getSourceCode() and using explicit ESLint AST typing: add
"import type { AST } from 'eslint'" at the top, cast node arguments to AST.Node
when calling getText, and replace "let { sourceCode } = context" with a typed
retrieval such as "const sourceCode = context.getSourceCode()" (typed as
SourceCode/AST where appropriate) so handlers use a typed fallback and satisfy
no-unsafe-argument.
| entry: [path.resolve(import.meta.dirname, 'index.ts')], | ||
| fileName: (_format, entryName) => `${entryName}.js`, | ||
| name: 'eslint-plugin-de-morgan', | ||
| formats: ['es'], | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
ESM paths: import.meta.dirname is not standard in Node 20/22; use fileURLToPath
With the engines now ^20 || >=22, import.meta.dirname isn’t available in Node’s ESM. This can break the build when Vite reads the config. Use fileURLToPath(import.meta.url) to derive a directory path.
Apply this diff:
import dts from 'vite-plugin-dts'
import path from 'node:path'
+import { fileURLToPath } from 'node:url'
export default defineConfig({
build: {
lib: {
- entry: [path.resolve(import.meta.dirname, 'index.ts')],
+ constDir: undefined as unknown as string, // placeholder for explanation; see note below
+ entry: [path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'index.ts')],
fileName: (_format, entryName) => `${entryName}.js`,
name: 'eslint-plugin-de-morgan',
formats: ['es'],
}, dts({
include: [
- path.join(import.meta.dirname, 'index.ts'),
- path.join(import.meta.dirname, 'rules'),
- path.join(import.meta.dirname, 'utils'),
+ path.join(path.dirname(fileURLToPath(import.meta.url)), 'index.ts'),
+ path.join(path.dirname(fileURLToPath(import.meta.url)), 'rules'),
+ path.join(path.dirname(fileURLToPath(import.meta.url)), 'utils'),
],
insertTypesEntry: true,
strictOutput: true,
copyDtsFiles: true,
}),Alternative (cleaner): declare once at the top:
const dirname = path.dirname(fileURLToPath(import.meta.url))and then use dirname in the three places above. I kept the diff minimal across the changed lines; feel free to hoist to a dirname const.
Also consider marking eslint and parser-related packages as externals explicitly in rollupOptions.external if you run into bundling surprises during ESM-only builds.
Try node -e "console.log(import.meta.dirname)" on Node 20/22 to confirm the property is undefined; then run a local vite build after applying the fix.
Also applies to: 25-27
🏁 Script executed:
#!/bin/bash
# Test import.meta.dirname in Node ESM
node --input-type=module -e "console.log(import.meta.dirname)" || echo "Error: import.meta.dirname is not defined"
# Test fileURLToPath usage for import.meta.url
node --input-type=module -e "import { fileURLToPath } from 'node:url'; import path from 'node:path'; console.log(path.dirname(fileURLToPath(import.meta.url)))"Length of output: 268
🏁 Script executed:
#!/bin/bash
# Check Node version in sandbox
node -vLength of output: 17
Ensure ESM compatibility across all Node 20.x LTS versions by replacing import.meta.dirname
The properties import.meta.dirname and import.meta.filename were only introduced in Node.js v20.11.0 and became stable in v21.2.0; earlier 20.x installs (e.g. v20.0.0–v20.10.x) will see these as undefined and break your Vite build (sonarsource.com, nodejs.org). Instead, derive the directory via the well-supported fileURLToPath(import.meta.url) pattern (available in Node 10.12+), which works across all your declared engine ranges (stackoverflow.com).
Please update vite.config.ts as follows:
• At the top of the file, add the URL helper and define a stable __dirname constant:
import dts from 'vite-plugin-dts'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))• Replace the entry path in build.lib:
- entry: [path.resolve(import.meta.dirname, 'index.ts')],
+ entry: [path.resolve(__dirname, 'index.ts')],• Replace each import.meta.dirname in your dts({ include: […] }) array:
- path.join(import.meta.dirname, 'index.ts'),
- path.join(import.meta.dirname, 'rules'),
- path.join(import.meta.dirname, 'utils'),
+ path.join(__dirname, 'index.ts'),
+ path.join(__dirname, 'rules'),
+ path.join(__dirname, 'utils'),• (Optional) If you encounter unexpected bundling of ESLint or parser dependencies during your ESM-only build, explicitly externalize them in build.rollupOptions:
rollupOptions: {
external: [
'eslint',
'espree',
'@typescript-eslint/parser'
]
}These changes remove reliance on the still-experimental import.meta.dirname and ensure your library builds correctly on all Node 20.x and ≥22.x runtimes.
🤖 Prompt for AI Agents
In vite.config.ts around lines 9 to 13, replace uses of import.meta.dirname
(which is unavailable on older Node 20.x releases) by adding an ESM-safe
__dirname derived from fileURLToPath(import.meta.url): import fileURLToPath from
node:url and path from node:path, compute const __dirname =
path.dirname(fileURLToPath(import.meta.url)) at the top of the file, then update
build.lib.entry to use path.resolve(__dirname, 'index.ts') (or equivalent) and
replace any import.meta.dirname occurrences in the dts({ include: [...] })
entries with __dirname-based paths; optionally add rollupOptions.external to the
build config to externalize 'eslint', 'espree', and '@typescript-eslint/parser'
if you see them bundled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
package.json (1)
85-85: Confirm Node engine bump is intentional.You’re dropping Node 18 and 21 (
^20 || >=22). If that’s deliberate for ESM/tooling parity, fine; otherwise consider>=18.18.0to keep more users.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (5)
.commitlintrc(0 hunks).prettierrc(0 hunks)commitlint.config.ts(1 hunks)package.json(3 hunks)prettier.config.ts(1 hunks)
💤 Files with no reviewable changes (2)
- .commitlintrc
- .prettierrc
🔇 Additional comments (4)
package.json (2)
14-14: ESM switch looks good.
"type": "module"aligns with ESLint 9 being ESM-only and yourexportsmap.
82-83: Peer dependency range must match ESLint v9 API usage.Code relies on
context.sourceCode(ESLint ≥9). Keeping"eslint": ">=8.0.0"will break users on ESLint 8.Apply:
"peerDependencies": { - "eslint": ">=8.0.0" + "eslint": ">=9.0.0" },commitlint.config.ts (1)
1-5: Prefer commitlint.config.mjs — commitlint CLI doesn't load .ts configs without a TS loadercommitlint's CLI typically won't load a TypeScript config unless you wire a TS loader into the runtime; prefer commitlint.config.mjs for reliability.
Suggested commitlint.config.mjs:
/** @type {import('@commitlint/types').UserConfig} */ export default { extends: ['@commitlint/config-conventional'], }Verification attempted:
echo "chore: test" | pnpm exec commitlint -Vfailed with "Command 'commitlint' not found" in this environment — re-run locally after adding commitlint as a devDependency (or provide access to install deps) to confirm.prettier.config.ts (1)
1-15: Prettier TS config may not be discovered by the CLI — rename to .mjs or ensure Prettier CLI/TS loader is presentpnpm exec prettier failed: "Command 'prettier' not found" — couldn't verify; either install Prettier in the repo or rename prettier.config.ts → prettier.config.mjs (or add a TS loader).
Proposed prettier.config.mjs:
/** @type {import('prettier').Config} */ const config = { plugins: ['prettier-plugin-jsdoc'], quoteProps: 'as-needed', arrowParens: 'avoid', bracketSpacing: true, trailingComma: 'all', singleQuote: true, endOfLine: 'lf', printWidth: 80, useTabs: false, semi: false, tabWidth: 2, } export default configQuick checks (run after installing Prettier):
pnpm exec prettier --find-config-path package.json pnpm exec prettier --loglevel debug --check package.json 2>&1 | rg -n "loaded config|config file"
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
Caution The MK3 agent failed during execution: Clone operation failed |
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
Caution The MK3 agent failed during execution: Clone operation failed |
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
Caution The MK3 agent failed during execution: Clone operation failed |
🚀
Summary by CodeRabbit
Chores
Refactor
Documentation
Tests