File tree 4 files changed +6
-7
lines changed
__tests__/plugins/importGlob
4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ export default tseslint.config(
67
67
'no-debugger' : [ 'error' ] ,
68
68
'no-empty' : [ 'warn' , { allowEmptyCatch : true } ] ,
69
69
'no-process-exit' : 'off' ,
70
- 'no-useless-escape' : 'off' ,
71
70
'prefer-const' : [
72
71
'warn' ,
73
72
{
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ describe('parse positives', async () => {
27
27
it ( 'basic' , async ( ) => {
28
28
expect (
29
29
await run ( `
30
- import.meta.glob(\ './modules/*.ts\ ')
30
+ import.meta.glob('./modules/*.ts')
31
31
` ) ,
32
32
) . toMatchInlineSnapshot ( `
33
33
[
@@ -45,7 +45,7 @@ describe('parse positives', async () => {
45
45
it ( 'array' , async ( ) => {
46
46
expect (
47
47
await run ( `
48
- import.meta.glob([\ './modules/*.ts\ ', './dir/*.{js,ts}\ '])
48
+ import.meta.glob(['./modules/*.ts', './dir/*.{js,ts}'])
49
49
` ) ,
50
50
) . toMatchInlineSnapshot ( `
51
51
[
@@ -65,7 +65,7 @@ describe('parse positives', async () => {
65
65
expect (
66
66
await run ( `
67
67
import.meta.glob([
68
- \ './modules/*.ts\ ',
68
+ './modules/*.ts',
69
69
"!./dir/*.{js,ts}"
70
70
], {
71
71
eager: true,
Original file line number Diff line number Diff line change @@ -1653,7 +1653,7 @@ export const cssDataUriRE =
1653
1653
export const importCssRE = / @ i m p o r t ( ' [ ^ ' ] + \. c s s ' | " [ ^ " ] + \. c s s " | [ ^ ' " ) ] + \. c s s ) /
1654
1654
// Assuming a function name won't be longer than 256 chars
1655
1655
// eslint-disable-next-line regexp/no-unused-capturing-group -- doesn't detect asyncReplace usage
1656
- const cssImageSetRE = / (?< = i m a g e - s e t \( ) ( (?: [ \w \ -] { 1 , 256 } \( [ ^ ) ] * \) | [ ^ ) ] ) * ) (? = \) ) /
1656
+ const cssImageSetRE = / (?< = i m a g e - s e t \( ) ( (?: [ \w - ] { 1 , 256 } \( [ ^ ) ] * \) | [ ^ ) ] ) * ) (? = \) ) /
1657
1657
1658
1658
const UrlRewritePostcssPlugin : PostCSS . PluginCreator < {
1659
1659
replacer : CssUrlReplacer
Original file line number Diff line number Diff line change @@ -725,7 +725,7 @@ interface ImageCandidate {
725
725
descriptor : string
726
726
}
727
727
const escapedSpaceCharacters = / (?: | \\ t | \\ n | \\ f | \\ r ) + / g
728
- const imageSetUrlRE = / ^ (?: [ \w \ -] + \( .* ?\) | ' .* ?' | " .* ?" | \S * ) /
728
+ const imageSetUrlRE = / ^ (?: [ \w - ] + \( .* ?\) | ' .* ?' | " .* ?" | \S * ) /
729
729
function joinSrcset ( ret : ImageCandidate [ ] ) {
730
730
return ret
731
731
. map ( ( { url, descriptor } ) => url + ( descriptor ? ` ${ descriptor } ` : '' ) )
@@ -773,7 +773,7 @@ export function processSrcSetSync(
773
773
}
774
774
775
775
const cleanSrcSetRE =
776
- / (?: u r l | i m a g e | g r a d i e n t | c r o s s - f a d e ) \( [ ^ ) ] * \) | " ( [ ^ " ] | (?< = \\ ) " ) * " | ' ( [ ^ ' ] | (?< = \\ ) ' ) * ' | d a t a : \w + \/ [ \w . + \ -] + ; b a s e 6 4 , [ \w + / = ] + | \? \S + , / g
776
+ / (?: u r l | i m a g e | g r a d i e n t | c r o s s - f a d e ) \( [ ^ ) ] * \) | " ( [ ^ " ] | (?< = \\ ) " ) * " | ' ( [ ^ ' ] | (?< = \\ ) ' ) * ' | d a t a : \w + \/ [ \w . + - ] + ; b a s e 6 4 , [ \w + / = ] + | \? \S + , / g
777
777
function splitSrcSet ( srcs : string ) {
778
778
const parts : string [ ] = [ ]
779
779
/**
You can’t perform that action at this time.
0 commit comments