Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
support for computed member expression
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Nov 9, 2022
1 parent d2fbe92 commit eced59e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 246 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ fn is_invalid_anchor(anchor_attribute: &JsxAttribute) -> Option<UseValidAnchorSt
}
JsAnyExpression::ImportMeta(_)
| JsAnyExpression::JsClassExpression(_)
| JsAnyExpression::JsComputedMemberExpression(_)
| JsAnyExpression::JsImportCallExpression(_)
| JsAnyExpression::JsLogicalExpression(_)
| JsAnyExpression::JsObjectExpression(_)
Expand Down
3 changes: 2 additions & 1 deletion crates/rome_js_analyze/tests/specs/a11y/useValidAnchor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
<a href={`https://www.javascript.com`}/>
<a href={somewhere}/>
<a {...spread }/>
<a href={getFileUrl({ id: cExport.exportBinaryId })}>Download</a>
<a href={getFileUrl()}>Download</a>
<a href={a ? b : c}>Download</a>
<a href={1 + 2}>Download</a>
<a href={await getLink()}>Download</a>
<a href={a["a"]}>Download</a>
</>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ expression: useValidAnchor.jsx
<a href={`https://www.javascript.com`}/>
<a href={somewhere}/>
<a {...spread }/>
<a href={getFileUrl()}>Download</a>
<a href={a ? b : c}>Download</a>
<a href={1 + 2}>Download</a>
<a href={await getLink()}>Download</a>
<a href={a["a"]}>Download</a>
</>
```

Expand Down
244 changes: 0 additions & 244 deletions crates/rome_js_analyze/tests/specs/a11y/useValidAnchor.jsx.snap.new

This file was deleted.

0 comments on commit eced59e

Please sign in to comment.