@compiled/eslint-plugin
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -15,3 +15,7 @@ "use strict"; | ||
} | ||
const [property, value] = chars.split(':'); | ||
// Split the property and value | ||
// e.g. `color: red` becomes ['color', 'red'] | ||
// also consider `background: url("https://some-url-b")`, which has a colon in the value. | ||
const [property, ...v] = chars.split(':'); | ||
const value = v.join(':'); | ||
// Extract any expressions listed before the property that were not delimited by a ; | ||
@@ -18,0 +22,0 @@ if (expressions.length) { |
{ | ||
"name": "@compiled/eslint-plugin", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"description": "A familiar and performant compile time CSS-in-JS library for React.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://compiledcssinjs.com/docs/pkg-eslint-plugin", |
@@ -615,3 +615,20 @@ import type { RuleTester } from 'eslint'; | ||
}, | ||
{ | ||
filename: 'colon-in-value.ts', | ||
code: ` | ||
import { css } from '@compiled/react'; | ||
css\` | ||
background-image: url('https://some-url-b'); | ||
\`; | ||
`, | ||
output: ` | ||
import { css } from '@compiled/react'; | ||
css({ | ||
backgroundImage: "url('https://some-url-b')" | ||
}); | ||
`, | ||
}, | ||
]), | ||
}); |
@@ -28,3 +28,7 @@ import type { SourceCode } from 'eslint'; | ||
const [property, value] = chars.split(':'); | ||
// Split the property and value | ||
// e.g. `color: red` becomes ['color', 'red'] | ||
// also consider `background: url("https://some-url-b")`, which has a colon in the value. | ||
const [property, ...v] = chars.split(':'); | ||
const value = v.join(':'); | ||
@@ -31,0 +35,0 @@ // Extract any expressions listed before the property that were not delimited by a ; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
333131
8155