mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-15 09:58:18 -07:00
Add prefer string starts/ends with eslint rule
This commit is contained in:
parent
5f86d89ca6
commit
6e057f07f9
@ -245,7 +245,8 @@ module.exports = {
|
|||||||
'Windows': 'readonly'
|
'Windows': 'readonly'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'@typescript-eslint/no-floating-promises': ['warn']
|
'@typescript-eslint/no-floating-promises': ['warn'],
|
||||||
|
'@typescript-eslint/prefer-string-starts-ends-with': ['error']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// TypeScript source files
|
// TypeScript source files
|
||||||
|
@ -108,7 +108,7 @@ function getDateValue(form, element, property) {
|
|||||||
const parts = date.toISOString().split('T');
|
const parts = date.toISOString().split('T');
|
||||||
|
|
||||||
// If the date is the same, preserve the time
|
// If the date is the same, preserve the time
|
||||||
if (parts[0].indexOf(val) === 0) {
|
if (parts[0].startsWith(val)) {
|
||||||
const iso = parts[1];
|
const iso = parts[1];
|
||||||
|
|
||||||
val += 'T' + iso;
|
val += 'T' + iso;
|
||||||
|
Loading…
Reference in New Issue
Block a user