From 2e54f7e586bc821f00770bb1214714c9b5020b48 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Thu, 1 Aug 2019 12:32:13 +0300 Subject: [PATCH 1/3] up postcss-jsx version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1471835fc5..3802952b98 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "pify": "^4.0.1", "postcss": "^7.0.14", "postcss-html": "^0.36.0", - "postcss-jsx": "^0.36.2", + "postcss-jsx": "^0.36.3", "postcss-less": "^3.1.4", "postcss-markdown": "^0.36.0", "postcss-media-query-parser": "^0.2.3", From 6eeb666e1242d0e9c3d805b0f0ce7cb58160e56e Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Thu, 1 Aug 2019 12:37:37 +0300 Subject: [PATCH 2/3] add tests --- lib/rules/property-no-unknown/__tests__/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/rules/property-no-unknown/__tests__/index.js b/lib/rules/property-no-unknown/__tests__/index.js index 9df57aca9b..010066a6c3 100644 --- a/lib/rules/property-no-unknown/__tests__/index.js +++ b/lib/rules/property-no-unknown/__tests__/index.js @@ -229,6 +229,16 @@ testRule(rule, { }, { code: "const Component = styled.a`\n\t${rule}: 1;\n`" + }, + { + code: ` + import glm from 'glamorous'; + const Component = glm.a({ + overflowX: 'auto', + overflowWrap: 'auto', + flexDirection: 'row', + }); + ` } ], From da10c85629718f742f586f87ed156c0f0049b2fb Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Thu, 1 Aug 2019 13:52:43 +0300 Subject: [PATCH 3/3] add reject test case --- lib/rules/property-no-unknown/__tests__/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/rules/property-no-unknown/__tests__/index.js b/lib/rules/property-no-unknown/__tests__/index.js index 010066a6c3..010c409985 100644 --- a/lib/rules/property-no-unknown/__tests__/index.js +++ b/lib/rules/property-no-unknown/__tests__/index.js @@ -261,6 +261,17 @@ testRule(rule, { message: messages.rejected("rule"), line: 2, column: 2 + }, + { + code: ` + import glm from 'glamorous'; + const Component = glm.a({ + overflwX: 'auto', + }); + `, + message: messages.rejected("overflw-x"), + line: 4, + column: 12 } ] });