File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' eslint-plugin-import-sorting ' : patch
3
+ ---
4
+
5
+ Fix error when plugin settings are undefined
Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ function isScoped(name: string) {
12
12
return name && scopedRegExp . test ( name )
13
13
}
14
14
15
- function isFramework ( name : string , pattern : string | RegExp ) {
15
+ function isFramework ( name : string , pattern : string ) {
16
16
return pattern && new RegExp ( pattern ) . test ( name )
17
17
}
18
18
19
19
function isThirdParty ( name : string ) {
20
20
return isModule ( name ) || isScoped ( name )
21
21
}
22
22
23
- function isFirstParty ( name : string , pattern : string | RegExp ) {
23
+ function isFirstParty ( name : string , pattern : string ) {
24
24
return pattern && new RegExp ( pattern ) . test ( name )
25
25
}
26
26
@@ -38,6 +38,7 @@ function isStyle(name: string) {
38
38
function assertStringSetting ( settings : TSESLint . SharedConfigurationSettings , setting : string ) {
39
39
let value = settings [ setting ]
40
40
41
+ if ( ! value ) return ''
41
42
if ( typeof value !== 'string' ) throw new Error ( `Invalid value for ${ setting } . String expected.` )
42
43
43
44
return value
You can’t perform that action at this time.
0 commit comments