File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ module.exports = {
84
84
'unicorn/no-useless-undefined' : 'off' ,
85
85
'unicorn/prefer-module' : 'off' ,
86
86
'unicorn/prefer-number-properties' : 'off' ,
87
- 'unicorn/prefer-regexp-test' : 'off' ,
88
87
'unicorn/prefer-spread' : 'off' ,
89
88
'unicorn/prefer-string-slice' : 'off' ,
90
89
'unicorn/prefer-ternary' : 'off' ,
Original file line number Diff line number Diff line change @@ -640,7 +640,7 @@ export default class HttpServer {
640
640
for ( const [ key , value ] of entries ( endpoint . responses ) ) {
641
641
if (
642
642
key !== 'default' &&
643
- errorMessage . match ( `^${ value . selectionPattern || key } $` )
643
+ `^${ value . selectionPattern || key } $` . test ( errorMessage )
644
644
) {
645
645
responseName = key
646
646
break
@@ -699,7 +699,7 @@ export default class HttpServer {
699
699
log . notice ( )
700
700
}
701
701
} else {
702
- headerValue = value . match ( / ^ ' .* ' $ / ) ? value . slice ( 1 , - 1 ) : value // See #34
702
+ headerValue = / ^ ' .* ' $ / . test ( value ) ? value . slice ( 1 , - 1 ) : value // See #34
703
703
}
704
704
// Applies the header;
705
705
if ( headerValue === '' ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export default async function checkGoVersion() {
5
5
6
6
try {
7
7
const { stdout } = await execa ( 'go' , [ 'version' ] )
8
- if ( stdout . match ( / g o 1 .\d + / g) ) {
8
+ if ( / g o 1 .\d + / g. test ( stdout ) ) {
9
9
goVersion = '1.x'
10
10
}
11
11
} catch {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default function splitHandlerPathAndName(handler) {
8
8
// filename: source
9
9
// path: ./src/somefolder/source
10
10
// name: LambdaFunctions::Handler.process
11
- if ( handler . match ( / : : / ) ) {
11
+ if ( / : : / . test ( handler ) ) {
12
12
const prepathDelimiter = handler . lastIndexOf ( '/' )
13
13
const prepath = handler . substr ( 0 , prepathDelimiter + 1 ) // include '/' for path
14
14
const postpath = handler . substr ( prepathDelimiter + 1 )
You can’t perform that action at this time.
0 commit comments