mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 19:44:39 +03:00
refactor(tauri.js): Fix ESLint errors in src/api/tauricon.ts (#455)
This commit is contained in:
parent
92bdedce46
commit
5dbf0638a9
@ -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',
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user