-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Move no-old-flexbox to table formatter #1545
Conversation
so close :P |
sheet.parsedContent.forEach(props => { | ||
const formattedStyleRule = StyleHelpers.getFormattedStyleRule(sheet.content, props); | ||
|
||
let url = sheet.header.sourceURL; | ||
if (!url) { |
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.
I also check if it matches the pageUrl if we want to be consistent. Also thoughts on using getDisplayName here?
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.
done
I have a fix in #1536 for the wonky indentation of the I can split out too btw |
caching pokemon is important for great performance |
@@ -18,3 +18,6 @@ | |||
body { | |||
background-color: #eee; | |||
} | |||
.doesnotapply { | |||
display: flexbox; /* FAIL */ | |||
} |
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.
new line
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.
done
urlList.push({ | ||
url: sheet.header.sourceURL, | ||
label: formattedStyleRule.location, | ||
url, |
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.
url: sheet.header.sourceURL || 'inline',
seems a bit clearer here
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.
added in the url === pageUrl
check above
@@ -96,14 +96,14 @@ function getFormattedStyleRule(content, parsedContent) { | |||
}, []).join('\n'); | |||
} | |||
|
|||
const block = ` | |||
${parsedContent.selector} { | |||
const block = `\`\`\`${parsedContent.selector} { |
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.
doing this in the extendedInfo
value seems a bit ugly. What about a different keyword for the table formatter that annotates code blocks with the ```s?
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.
done
|
||
return { | ||
styleRule: block.trim(), | ||
location: `line: ${startLine}, row: ${start}, col: ${end}` | ||
startLine, | ||
location: `${start}:${end}` |
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.
we should think about settling on a format for parsed source blocks at some point. ESTree has a semi-standard format (albeit for JS): https://github.com/estree/estree/blob/master/es5.md#node-objects
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.
ack
PTAL |
needs a rebase due to table churn |
rebased! |
@@ -86,6 +86,8 @@ class Table extends Formatter { | |||
switch (key) { | |||
case 'code': | |||
return '`' + value.trim() + '`'; | |||
case 'pre': | |||
return '\`\`\`\n' + result[key].trim() + '\`\`\`'; |
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.
add this to table-formatter-test.js
?
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.
oh, and added to the jsdoc above :)
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.
done
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.
💪
┳┳
R: @patrickhulce all
This PR:
<pre>
support to the markdown rendererno-old-flexbox
audit where it was not finding all old flexbox uses. The audit was incorrectly testing vendor prefixed css properties and matching them with prefixed values. They need to be run separately.