File tree Expand file tree Collapse file tree 3 files changed +4
-14
lines changed
Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Original file line number Diff line number Diff line change 11{
2- "src/dotcom/requests.ts" : {
3- "@typescript-eslint/no-unnecessary-condition" : {
4- "count" : 1
5- }
6- },
72 "src/server/api/ampEpicRouter.ts" : {
83 "@typescript-eslint/no-unsafe-assignment" : {
94 "count" : 3
Original file line number Diff line number Diff line change 2222 "publish-dry-run" : " pnpm publish --dry-run" ,
2323 "publish" : " pnpm publish" ,
2424 "lint" : " eslint ." ,
25+ "prune-lint-suppressions" : " pnpm lint --prune-suppressions" ,
2526 "prettier:check" : " prettier --check ./src" ,
2627 "prettier:fix" : " prettier --write ./src" ,
2728 "test" : " export stage=DEV; jest" ,
Original file line number Diff line number Diff line change 1+ import { URLSearchParams } from 'url' ;
12import type {
23 BannerPayload ,
34 BannerProps ,
@@ -25,15 +26,8 @@ export interface ModuleDataResponse<PROPS> {
2526type ModuleType = 'epic' | 'liveblog-epic' | 'banner' | 'header' | 'gutter-liveblog' ;
2627
2728const getForcedVariant = ( type : ModuleType ) : string | null => {
28- if ( URLSearchParams ) {
29- const params = new URLSearchParams ( window . location . search ) ;
30- const value = params . get ( `force-${ type } ` ) ;
31- if ( value ) {
32- return value ;
33- }
34- }
35-
36- return null ;
29+ const params = new URLSearchParams ( window . location . search ) ;
30+ return params . get ( `force-${ type } ` ) ;
3731} ;
3832
3933type Payload = EpicPayload | BannerPayload | HeaderPayload | GutterPayload ;
You can’t perform that action at this time.
0 commit comments