-
Notifications
You must be signed in to change notification settings - Fork 181
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
Resolve JS-3 Stricter rule implementation for detecting a valid header #4662
Conversation
|
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.
LGTM!
const rows: TableCell[][] = []; | ||
let unknownTableStructure = false; | ||
tree.children.forEach(child => { | ||
if (child.type === 'JSXElement') { |
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.
reminder: handle JSXFragment
Trying to expand on the logic in https://github.com/SonarSource/sonar-html/blob/master/sonar-html-plugin/src/main/java/org/sonar/plugins/html/checks/sonar/TableWithoutHeaderCheck.java
Trying to be stricter about the implementation and the logic applied is as follows:
<table>
's)For the most part following the spec - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th
The only missing thing is not breaking up separately the
<thead>
,<tbody>
and<tfoot>
and running the full grid check.