1
0
Fork 0

Speed up client lint

This commit is contained in:
Chocobozzz 2021-08-18 10:43:47 +02:00
parent 33a53638c2
commit e5a818d3cb
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 12 additions and 5 deletions

View file

@ -11,10 +11,9 @@
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
"tsconfig.eslint.json"
],
"createDefaultProgram": true
"createDefaultProgram": false
},
"extends": [
"../.eslintrc.json",

View file

@ -657,7 +657,7 @@ export class PeerTubeEmbed {
}
private handleError (err: Error, translations?: { [ id: string ]: string }) {
if (err.message.indexOf('from xs param') !== -1) {
if (err.message.includes('from xs param')) {
this.player.dispose()
this.playerElement = null
this.displayError('This video is not available because the remote instance is not responding.', translations)

View file

@ -8,7 +8,7 @@ window.addEventListener('load', async () => {
const isPlaylist = window.location.pathname.startsWith('/video-playlists/')
const elementId = lastPart.indexOf('?') === -1 ? lastPart : lastPart.split('?')[0]
const elementId = !lastPart.includes('?') ? lastPart : lastPart.split('?')[0]
const iframe = document.createElement('iframe')
iframe.src = isPlaylist

View file

@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"include": [
// adjust "includes" to what makes sense for you and your project
"src/**/*.ts",
"e2e/**/*.ts"
]
}