File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
src/main/zapHomeFiles/hud Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 79
79
"no-unused-vars" : " error" ,
80
80
"prefer-destructuring" : " error" ,
81
81
"unicorn/no-for-loop" : " error" ,
82
- "unicorn/prefer-includes" : " warn " ,
82
+ "unicorn/prefer-includes" : " error " ,
83
83
"unicorn/prefer-string-slice" : " warn" ,
84
84
"unicorn/filename-case" : " warn" ,
85
85
"unicorn/prefer-query-selector" : " error"
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ Vue.component('history', {
56
56
return re . test ( message . url ) ;
57
57
}
58
58
59
- return message . url . indexOf ( self . filter ) >= 0 ;
59
+ return message . url . includes ( self . filter ) ;
60
60
} ) ;
61
61
}
62
62
} ,
@@ -170,7 +170,7 @@ Vue.component('websockets', {
170
170
return re . test ( message . messageSummary ) ;
171
171
}
172
172
173
- return message . messageSummary . indexOf ( self . filter ) >= 0 ;
173
+ return message . messageSummary . includes ( self . filter ) ;
174
174
} ) ;
175
175
}
176
176
} ,
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ const Break = (function () {
136
136
137
137
utils . getAllClients ( 'display' )
138
138
. then ( clients => {
139
- const isFirefox = this . navigator . userAgent . indexOf ( 'Firefox' ) > - 1 ;
139
+ const isFirefox = this . navigator . userAgent . includes ( 'Firefox' ) ;
140
140
let r = false ;
141
141
142
142
if ( isFirefox ) {
@@ -198,7 +198,7 @@ const Break = (function () {
198
198
function showBreakWebSocketDisplay ( data ) {
199
199
utils . getAllClients ( 'display' )
200
200
. then ( clients => {
201
- const isFirefox = this . navigator . userAgent . indexOf ( 'Firefox' ) > - 1 ;
201
+ const isFirefox = this . navigator . userAgent . includes ( 'Firefox' ) ;
202
202
let r = false ;
203
203
204
204
if ( isFirefox ) {
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ const utils = (function () {
58
58
headerText = headerText . substring ( headerText . indexOf ( ':' ) + 2 ) ;
59
59
let value ;
60
60
61
- if ( headerText . indexOf ( '\n' ) < 0 ) {
61
+ if ( ! headerText . includes ( '\n' ) ) {
62
62
value = headerText ;
63
63
headerText = '' ;
64
64
} else {
@@ -125,7 +125,7 @@ const utils = (function () {
125
125
}
126
126
127
127
function hasScheme ( url ) {
128
- return url . indexOf ( '://' ) > - 1 ;
128
+ return url . includes ( '://' ) ;
129
129
}
130
130
131
131
/*
@@ -152,7 +152,7 @@ const utils = (function () {
152
152
* Initialize all of the info that will be stored in indexeddb.
153
153
*/
154
154
function initializeHUD ( leftTools , rightTools , drawer ) {
155
- if ( IS_DEV_MODE && leftTools . indexOf ( 'hudErrors' ) < 0 ) {
155
+ if ( IS_DEV_MODE && ! leftTools . includes ( 'hudErrors' ) ) {
156
156
// Always add the error tool in dev mode
157
157
leftTools . push ( 'hudErrors' ) ;
158
158
}
You can’t perform that action at this time.
0 commit comments