File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 99 " airbnb-base" ,
1010 " eslint:recommended" ,
1111 " plugin:@typescript-eslint/recommended" ,
12+ " plugin:@typescript-eslint/strict" ,
1213 " prettier" ,
1314 " plugin:prettier/recommended"
1415 ],
1516 "parser" : " @typescript-eslint/parser" ,
1617 "parserOptions" : {
18+ "project" : " tsconfig.json" ,
1719 "ecmaVersion" : " latest" ,
1820 "sourceType" : " module"
1921 },
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function parseQueryAndParams(
1717 params ?: readonly ( string | object | number | boolean ) [ ] ,
1818) : string {
1919 let _sql = sql ;
20- if ( params && params . length ) {
20+ if ( params ? .length ) {
2121 params . forEach ( ( value ) => {
2222 if ( typeof value === 'string' ) {
2323 _sql = _sql . replace ( '?' , `"${ value } "` ) ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export async function askPasswordIfNeeded(options: {
2828 readonly password ?: string ;
2929} ) : Promise < string > {
3030 if ( options . type === 'sqlite' || options . password )
31- return options . password || '' ;
31+ return options . password ?? '' ;
3232 return new Promise < string > ( ( resolve ) => {
3333 let muted = false ;
3434 const rl = readline . createInterface ( {
@@ -140,9 +140,9 @@ export function registerCommand(
140140
141141 const command = program . command ( commandName ) . description ( description ) ;
142142 args . forEach ( ( key ) => command . addArgument ( _args [ key ] ( ) ) ) ;
143- Object . entries ( options )
144- . filter ( ( [ , value ] ) => value )
145- . forEach ( ( [ key ] ) => command . addOption ( _options [ key as OptionKeys ] ( ) ) ) ;
143+ Object . keys ( options ) . forEach ( ( key ) =>
144+ command . addOption ( _options [ key as OptionKeys ] ( ) ) ,
145+ ) ;
146146 command . action ( action ) ;
147147 return program ;
148148}
You can’t perform that action at this time.
0 commit comments