ソースを参照

refactor(tauri.js): Fix ESLint errors in src/api/tauricon.ts (#455)

Rajiv Shah 5 年 前
コミット
5dbf0638a9
2 ファイル変更3 行追加2 行削除
  1. 1 0
      cli/tauri.js/.eslintrc.js
  2. 2 2
      cli/tauri.js/src/api/tauricon.ts

+ 1 - 0
cli/tauri.js/.eslintrc.js

@@ -48,6 +48,7 @@ module.exports = {
     'security/detect-possible-timing-attacks': 'error',
     'security/detect-pseudoRandomBytes': 'error',
     'space-before-function-paren': 'off',
+    '@typescript-eslint/default-param-last': 'off',
     '@typescript-eslint/strict-boolean-expressions': 0,
     '@typescript-eslint/space-before-function-paren': [
       'error',

+ 2 - 2
cli/tauri.js/src/api/tauricon.ts

@@ -61,7 +61,7 @@ const checkSrc = async (src: string): Promise<boolean | sharp.Sharp> => {
       process.exit(1)
     } else {
       const buffer = await readChunk(src, 0, 8)
-      if (isPng(buffer) === true) {
+      if (isPng(buffer)) {
         return (image = sharp(src))
       } else {
         image = false
@@ -309,7 +309,7 @@ const tauricon = (exports.tauricon = {
       // prevent overlay or pure
       block = true
     }
-    if (block === true || options.splashscreen_type === 'generate') {
+    if (block || options.splashscreen_type === 'generate') {
       await this.validate(src, target)
       if (!image) {
         process.exit(1)