FIX warnings from emotion about '":nth-child" is potentially unsafe'

This commit is contained in:
Norbert de Langen 2019-02-06 17:38:59 +01:00
parent 634b72ab5e
commit 93fe39d00e
4 changed files with 3233 additions and 256 deletions

View File

@ -1,11 +1,227 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Storyshots Basics|SyntaxHighlighter bash 1`] = `
.emotion-2 {
position: relative;
overflow: auto;
}
.emotion-2 code {
padding-right: 10px;
}
.emotion-2 * .token {
font-family: "Operator Mono","Fira Code Retina","Fira Code","FiraCode-Retina","Andale Mono","Lucida Console",Consolas,Monaco,monospace;
-webkit-font-smoothing: antialiased;
}
.emotion-2 * .token.comment {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.prolog {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.doctype {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.cdata {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.string {
color: #A31515;
}
.emotion-2 * .token.punctuation {
color: #393A34;
}
.emotion-2 * .token.operator {
color: #393A34;
}
.emotion-2 * .token.url {
color: #36acaa;
}
.emotion-2 * .token.symbol {
color: #36acaa;
}
.emotion-2 * .token.number {
color: #36acaa;
}
.emotion-2 * .token.boolean {
color: #36acaa;
}
.emotion-2 * .token.variable {
color: #36acaa;
}
.emotion-2 * .token.constant {
color: #36acaa;
}
.emotion-2 * .token.inserted {
color: #36acaa;
}
.emotion-2 * .token.atrule {
color: #0000ff;
}
.emotion-2 * .token.keyword {
color: #0000ff;
}
.emotion-2 * .token.attr-value {
color: #0000ff;
}
.emotion-2 * .token.function {
color: #393A34;
}
.emotion-2 * .token.deleted {
color: #9a050f;
}
.emotion-2 * .token.important {
font-weight: bold;
}
.emotion-2 * .token.bold {
font-weight: bold;
}
.emotion-2 * .token.italic {
font-style: italic;
}
.emotion-2 * .token.class-name {
color: #2B91AF;
}
.emotion-2 * .token.tag {
color: #800000;
}
.emotion-2 * .token.selector {
color: #800000;
}
.emotion-2 * .token.attr-name {
color: #ff0000;
}
.emotion-2 * .token.property {
color: #ff0000;
}
.emotion-2 * .token.regex {
color: #ff0000;
}
.emotion-2 * .token.entity {
color: #ff0000;
}
.emotion-2 * .token.directive.tag .tag {
background: #ffff00;
color: #393A34;
}
.emotion-2 * .language-json .token.boolean {
color: #0000ff;
}
.emotion-2 * .language-json .token.number {
color: #0000ff;
}
.emotion-2 * .language-json .token.property {
color: #2B91AF;
}
.emotion-2 * .namespace {
opacity: 0.7;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
.emotion-3 {
position: relative;
overflow: hidden;
}
.emotion-1 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
margin: 0;
padding: 0;
}
<div
class="emotion-3"
>
<div
class="emotion-2"
>
<pre
class="hljs emotion-1"
>
<code
class="emotion-0"
>
npx npm-check-updates
<span
class="token string"
>
'/storybook/'
</span>
-u
<span
class="token operator"
>
&&
</span>
yarn
</code>
</pre>
</div>
</div>
`;
exports[`Storyshots Basics|SyntaxHighlighter bordered & copy-able 1`] = `
.emotion-5 {
position: relative;
overflow: hidden;
border: 1px solid rgba(0,0,0,0.1);
border-radius: 4px;
background: rgba(255,255,255,1);
}
.emotion-2 {
position: relative;
overflow: auto;
@ -171,7 +387,7 @@ exports[`Storyshots Basics|SyntaxHighlighter bash 1`] = `
-ms-flex-pack: start;
justify-content: flex-start;
margin: 0;
padding: 0;
padding: 10px;
}
.emotion-0 {
@ -182,38 +398,6 @@ exports[`Storyshots Basics|SyntaxHighlighter bash 1`] = `
opacity: 1;
}
<div
class="emotion-3"
>
<div
class="emotion-2"
>
<pre
class="hljs emotion-1"
>
<code
class="emotion-0"
>
npx npm-check-updates
<span
class="token string"
>
'/storybook/'
</span>
-u
<span
class="token operator"
>
&&
</span>
yarn
</code>
</pre>
</div>
</div>
`;
exports[`Storyshots Basics|SyntaxHighlighter bordered & copy-able 1`] = `
.emotion-4 {
position: absolute;
bottom: 0;
@ -263,190 +447,6 @@ exports[`Storyshots Basics|SyntaxHighlighter bordered & copy-able 1`] = `
outline: 0 none;
}
.emotion-2 {
position: relative;
overflow: auto;
}
.emotion-2 code {
padding-right: 10px;
}
.emotion-2 * .token {
font-family: "Operator Mono","Fira Code Retina","Fira Code","FiraCode-Retina","Andale Mono","Lucida Console",Consolas,Monaco,monospace;
-webkit-font-smoothing: antialiased;
}
.emotion-2 * .token.comment {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.prolog {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.doctype {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.cdata {
color: #008000;
font-style: italic;
}
.emotion-2 * .token.string {
color: #A31515;
}
.emotion-2 * .token.punctuation {
color: #393A34;
}
.emotion-2 * .token.operator {
color: #393A34;
}
.emotion-2 * .token.url {
color: #36acaa;
}
.emotion-2 * .token.symbol {
color: #36acaa;
}
.emotion-2 * .token.number {
color: #36acaa;
}
.emotion-2 * .token.boolean {
color: #36acaa;
}
.emotion-2 * .token.variable {
color: #36acaa;
}
.emotion-2 * .token.constant {
color: #36acaa;
}
.emotion-2 * .token.inserted {
color: #36acaa;
}
.emotion-2 * .token.atrule {
color: #0000ff;
}
.emotion-2 * .token.keyword {
color: #0000ff;
}
.emotion-2 * .token.attr-value {
color: #0000ff;
}
.emotion-2 * .token.function {
color: #393A34;
}
.emotion-2 * .token.deleted {
color: #9a050f;
}
.emotion-2 * .token.important {
font-weight: bold;
}
.emotion-2 * .token.bold {
font-weight: bold;
}
.emotion-2 * .token.italic {
font-style: italic;
}
.emotion-2 * .token.class-name {
color: #2B91AF;
}
.emotion-2 * .token.tag {
color: #800000;
}
.emotion-2 * .token.selector {
color: #800000;
}
.emotion-2 * .token.attr-name {
color: #ff0000;
}
.emotion-2 * .token.property {
color: #ff0000;
}
.emotion-2 * .token.regex {
color: #ff0000;
}
.emotion-2 * .token.entity {
color: #ff0000;
}
.emotion-2 * .token.directive.tag .tag {
background: #ffff00;
color: #393A34;
}
.emotion-2 * .language-json .token.boolean {
color: #0000ff;
}
.emotion-2 * .language-json .token.number {
color: #0000ff;
}
.emotion-2 * .language-json .token.property {
color: #2B91AF;
}
.emotion-2 * .namespace {
opacity: 0.7;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
.emotion-5 {
position: relative;
overflow: hidden;
border: 1px solid rgba(0,0,0,0.1);
border-radius: 4px;
background: rgba(255,255,255,1);
}
.emotion-1 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
margin: 0;
padding: 10px;
}
<div
class="emotion-5"
>
@ -655,11 +655,6 @@ exports[`Storyshots Basics|SyntaxHighlighter bordered & copy-able 1`] = `
`;
exports[`Storyshots Basics|SyntaxHighlighter jsx 1`] = `
.emotion-3 {
position: relative;
overflow: hidden;
}
.emotion-2 {
position: relative;
overflow: auto;
@ -815,6 +810,19 @@ exports[`Storyshots Basics|SyntaxHighlighter jsx 1`] = `
opacity: 0.7;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
.emotion-3 {
position: relative;
overflow: hidden;
}
.emotion-1 {
display: -webkit-box;
display: -webkit-flex;
@ -828,14 +836,6 @@ exports[`Storyshots Basics|SyntaxHighlighter jsx 1`] = `
padding: 0;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
<div
class="emotion-3"
>
@ -1065,11 +1065,6 @@ exports[`Storyshots Basics|SyntaxHighlighter jsx 1`] = `
`;
exports[`Storyshots Basics|SyntaxHighlighter showLineNumbers 1`] = `
.emotion-3 {
position: relative;
overflow: hidden;
}
.emotion-2 {
position: relative;
overflow: auto;
@ -1225,6 +1220,19 @@ exports[`Storyshots Basics|SyntaxHighlighter showLineNumbers 1`] = `
opacity: 0.7;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
.emotion-3 {
position: relative;
overflow: hidden;
}
.emotion-1 {
display: -webkit-box;
display: -webkit-flex;
@ -1238,14 +1246,6 @@ exports[`Storyshots Basics|SyntaxHighlighter showLineNumbers 1`] = `
padding: 0;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
<div
class="emotion-3"
>
@ -1477,11 +1477,6 @@ exports[`Storyshots Basics|SyntaxHighlighter showLineNumbers 1`] = `
`;
exports[`Storyshots Basics|SyntaxHighlighter story 1`] = `
.emotion-3 {
position: relative;
overflow: hidden;
}
.emotion-2 {
position: relative;
overflow: auto;
@ -1637,6 +1632,19 @@ exports[`Storyshots Basics|SyntaxHighlighter story 1`] = `
opacity: 0.7;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
.emotion-3 {
position: relative;
overflow: hidden;
}
.emotion-1 {
display: -webkit-box;
display: -webkit-flex;
@ -1650,14 +1658,6 @@ exports[`Storyshots Basics|SyntaxHighlighter story 1`] = `
padding: 0;
}
.emotion-0 {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-right: 0;
opacity: 1;
}
<div
class="emotion-3"
>

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@ configure({ adapter: new Adapter() });
*/
const ignoreList = [
error => error.message.includes('":nth-child" is potentially unsafe'),
error => error.message.includes('":first-child" is potentially unsafe'),
error => error.message.includes('Failed prop type') && error.stack.includes('storyshots'),
];