File tree 4 files changed +21
-5
lines changed
4 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,19 @@ module.exports = {
28
28
'@typescript-eslint/no-var-requires' : 'off' ,
29
29
'@typescript-eslint/explicit-function-return-type' : 'off' ,
30
30
'@typescript-eslint/no-explicit-any' : 'off' ,
31
- '@typescript-eslint/ban-ts-comment' : 'warn'
31
+ '@typescript-eslint/ban-ts-comment' : 'warn' ,
32
+ '@typescript-eslint/no-unused-expressions' : 'off' ,
33
+ '@typescript-eslint/no-unused-vars' : [
34
+ 'error' ,
35
+ {
36
+ args : 'all' ,
37
+ argsIgnorePattern : '^_' ,
38
+ caughtErrors : 'all' ,
39
+ caughtErrorsIgnorePattern : '^_' ,
40
+ destructuredArrayIgnorePattern : '^_' ,
41
+ varsIgnorePattern : '^_' ,
42
+ ignoreRestSiblings : true
43
+ }
44
+ ]
32
45
}
33
46
} ;
Original file line number Diff line number Diff line change 1
1
/* eslint @typescript-eslint/explicit-module-boundary-types: 0 */
2
2
try {
3
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
3
4
const pg = require ( 'pg' ) ;
4
5
pg . types . setTypeParser ( 20 , 'text' , parseInt ) ;
5
- } catch ( err ) {
6
+ } catch ( _err ) {
6
7
logger . info ( 'There is no pg' ) ;
7
8
}
8
9
import { config } from './config' ;
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ export default async (
33
33
ttl : Number . isNaN ( rssFeed . ttl ) ? 0 : rssFeed . ttl
34
34
} ;
35
35
} catch ( e ) {
36
- ctx . reply ( `${ url } ${ i18n [ lang ] [ 'FETCH_ERROR' ] } ` ) ;
36
+ ctx . reply (
37
+ `${ url } ${ i18n [ lang ] [ 'FETCH_ERROR' ] } ${ e . message } `
38
+ ) ;
37
39
return undefined ;
38
40
}
39
41
}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export async function isFeedValid(feedStr: string): Promise<Option<TRSS>> {
7
7
try {
8
8
const feed = await parseString ( feedStr ) ;
9
9
return Optional ( feed ) ;
10
- } catch ( e ) {
10
+ } catch ( _e ) {
11
11
return none ;
12
12
}
13
13
}
@@ -27,7 +27,7 @@ export async function findFeed(
27
27
const url = linkTag . match ( / h r e f = " ( .+ ?) " / ) [ 1 ] ;
28
28
try {
29
29
return new URL ( url ) . toString ( ) ;
30
- } catch ( e ) {
30
+ } catch ( _e ) {
31
31
reqURL . pathname = url ;
32
32
return reqURL . toString ( ) ;
33
33
}
You can’t perform that action at this time.
0 commit comments