Skip to content

Commit

Permalink
fixed: linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Apr 26, 2024
1 parent e61e721 commit 6b46faa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/generators/css/index.js
Expand Up @@ -37,7 +37,8 @@ const CSS_SELECTOR = RegExp(
* @const {RegExp}
*/

const CSS_SELECTOR_LIST = /([^,]+)(?::(?!host)\w+(?:[\s|\S]*?\))?(?:[^,:]*)?)+|([^,]+)/g
const CSS_SELECTOR_LIST =
/([^,]+)(?::(?!host)\w+(?:[\s|\S]*?\))?(?:[^,:]*)?)+|([^,]+)/g

/**
* Scope the css selectors prefixing them with the tag name
Expand Down
7 changes: 5 additions & 2 deletions test/generators/css.spec.js
Expand Up @@ -248,9 +248,12 @@ describe('Generators - CSS', () => {
)

expect(
addScopeToSelectorList('my-tag', `:host[color='blue'] span, :host[color='red'] span`),
addScopeToSelectorList(
'my-tag',
`:host[color='blue'] span, :host[color='red'] span`,
),
).to.be.equal(
'my-tag[color=\'blue\'] span,[is="my-tag"][color=\'blue\'] span,my-tag[color=\'red\'] span,[is="my-tag"][color=\'red\'] span',
"my-tag[color='blue'] span,[is=\"my-tag\"][color='blue'] span,my-tag[color='red'] span,[is=\"my-tag\"][color='red'] span",
)
})
})

0 comments on commit 6b46faa

Please sign in to comment.