We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version: canary
import { assertEquals } from "jsr:@std/[email protected]"; Deno.test("default", () => { const diagnostics = Deno.lint.runPlugin( { name: "test", rules: { "rule": { create: (ctx) => ({ Property(node) { console.log(node); if (node.value.type === "AssignmentPattern") { ctx.report({ node, message: "Unexpected =" }); } }, }), }, }, }, "test.ts", "({ a = b } = {})", ); assertEquals(diagnostics.length, 1); });
Run with deno test.
Correct AST should be same as for { a: a = b } where both a's are the same node:
{ a: a = b }
{ "type": "ObjectPattern", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", }, "kind": "init", "shorthand": true, "value": { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "a", }, "optional": false, "right": { "type": "Identifier", "name": "b", } } } ] }
The text was updated successfully, but these errors were encountered:
7f7b51c
marvinhagemeister
Successfully merging a pull request may close this issue.
Version: canary
Run with deno test.
Correct AST should be same as for
{ a: a = b }
where both a's are the same node:The text was updated successfully, but these errors were encountered: