React Native Android biometrics – can I locally authenticate using face lock? From what I see, only fingerprint authentication works

I can set a fingerprint and a face unlock on my Android phone and currently I am trying to check if either is available and biometrically authenticate the user in my application.

I am currently using the react-native-biometrics package which supports both TouchID and FaceID for iOS, but only Biometrics for Android. When I do this:

const { biometryType } = await biometrics.isSensorAvailable();

It is only defined if I have a fingerprint unlock set up.

    const { success } = await biometrics.simplePrompt({
        promptMessage: 'Confirmation',
    });

Also only triggers if I have fingerprint unlock set up. It doesn’t do anything if I just have face unlock set up.

From what I can see, all React Native libraries that I have found only support fingerprint for Android. I imagine there must be some sort of Android reason for this?

onblur used for validation skips to next field

part of the form shown below:

function validatenumber(Num)
{
  var x=Num.value;
  if (isNaN(parseFloat(x)) && isFinite(x) == false)
    {
      Num.value="";
      alert("Not a valid number");
      Num.focus();
    }
}
<tr>
  <td>
    <label for="qty1">Full Series: $135.00</label>
  </td>
  <td>
    <input name="qty1" type="text" id="qty1" size="5" onblur="validatenumber(this)"/>
  </td>
</tr>
<tr>
  <td>
    <label for="qty2">Mini-Series: $115.00</label>
  </td>
  <td>
    <input name="qty2" type="text" id="qty2" size="5" onblur="validatenumber(this)"/>
  </td>
</tr>

if a non-number is entered in first field (qty1), the error alert pops up as expected, the field (qty1) is cleared but the focus moves to the next field (qty2) rather than staying in qty1. Also, if a non-number is entered into qty2 field no alert is given.

Not expected behavior. Solutions?

thanks

have no idea what to change. That’s why I’m asking

Console.log only showing for a split second

Has anyone ever came across this problem? I have stripped my app down completely to basically a shell in a new React app so it’s only the layout and a console.log on a button click

  return (
    <div className='mainDiv'>
      <form className='inputDiv'>
        <div className='dayDiv'>
          <label htmlFor='day'>DAY</label>
          <input type='number' placeholder='DD' name='day' id='day' min='1' max='31' ></input>
        </div>
        <div className='monthDiv'>
          <label htmlFor='month'>MONTH</label>
          <input type='number' placeholder='MM' name='month' id='month' min='01' max='12'></input>
        </div>
        <div className='yearDiv'>
          <label htmlFor='year'>YEAR</label>
          <input type='number' placeholder='YYYY' name='year' id='year' min='1900' max='2023'></input>
        </div>
        <div className='lineDiv'>
          <div className='lineBtn'>
            <div className='break' />
            <button className='btn' onClick={() => console.log('hello')}>
              <img src='./images/logo2.png' className='btnImg' alt='logo' />
            </button>
          </div>
        </div>
      </form>
      <div className='dataDiv'>
        <p>
          <span className='spanNumbers'>--</span>
          <span className='spanText'>years</span>
        </p>
        <p>
          <span className='spanNumbers'>--</span>
          <span className='spanText'>months</span>
        </p><p>
          <span className='spanNumbers'>--</span>
          <span className='spanText'>days</span>
        </p>
      </div>
      <div>
      </div>
    </div>
  )
}

When I click the button, it shows up in my chrome console saying ‘hello’ for about half a second, then it looks like the console refreshes and it’s gone

I read about similar problems where it was an extension but I have deleted all my extensions and it still doesn’t work, I’m not getting any errors show up on the chrome console or in my vscode console so I am really struggling to troubleshoot this

How to skip the last four rows from sort using MatSort?

I want that when I sort the table depending on the column header I click the last four rows are not sorted.
table image

<table mat-table [dataSource]="dataSourceMD" matSort (matSortChange)="getRowMaximoTable('dataSourceMD', 'indexMaximoMD')" matTableExporter #exporter="matTableExporter" #sortMD="matSort" class="tr_table">

                    <ng-container *ngFor="let disCol of displayedColumnsMD; let colIndex = index"
                        matColumnDef="{{disCol}}" [sticky]="isIn(disCol)">
                        <th mat-header-cell *matHeaderCellDef mat-sort-header>
                            <div [innerHTML]="displayedColumnsNamesMD[colIndex]"></div>
                        </th>
                        <td mat-cell *matCellDef="let element"  [style.background-color]="element[disCol+'Color']" [style.color]="element[disCol+'Texto']">
                            <div *ngIf="element[disCol]" [innerHTML]="element[disCol]"></div>
                            <div *ngIf="!element[disCol] && !isIn(disCol)" [innerHTML]="'-'"></div>
                        </td>
                    </ng-container>

                    <ng-container *ngFor="let filCol of displayedFilterColumnMD; let colIndexF = index"
                        matColumnDef="{{filCol}}" [sticky]="colIndexF<3">
                        <th mat-header-cell *matHeaderCellDef [style.text-align]="center" [attr.colspan]="1">
                            <mat-form-field class="columnas" floatLabel='never'>
                                <input matInput placeholder="Filtro" type="text"
                                    [(ngModel)]='filterTableMD[displayedColumnsMD[colIndexF]]'
                                    name="displayedColumnsMD[colIndexF]"
                                    (keyup)="hanlerOnChangeFilter($event, 'MD',displayedColumnsMD[colIndexF])">
                                <button mat-button *ngIf="filterTableMD[displayedColumnsMD[colIndexF]]"
                                    (click)="handlerClearFilterField('MD',displayedColumnsMD[colIndexF])" matSuffix
                                    mat-icon-button aria-label="Clear">
                                    <mat-icon class="material-icons-outlined">close</mat-icon>
                                </button>
                            </mat-form-field>
                        </th>
                    </ng-container>          

                    <tr mat-header-row *matHeaderRowDef="displayedColumnsMD; sticky: true"></tr>
                    <tr mat-header-row *matHeaderRowDef="displayedFilterColumnMD"></tr>
                    <tr mat-row [ngClass]="{ 'maximo-row': i == indexMaximoMD }" *matRowDef="let row; columns: displayedColumnsMD; let i = index"></tr>

                </table>

I want the last four rows to stay fixed, how can I do it? The table is an Angular Material component and uses the matSort attribute to sort the table data from the dataSource array.

Mouse Precision Algorithm Have A Gap On Different Screens For Remote Desktop App Made Made By Electron

Hey I Made My Electron Js Application Its A Combination Of WebRTC Socket IO For Reciver App ( This App Installed on remote pc it send back video stream) Sender APP ( This App also made in electron js but uses react js framework )

So Sender App record mouse moment on video source of reciver app so it look like we are hovering on screeen issue is that i am facing gap from my mouse and remote pc mouse means its not precise

type here

I found many algorith nothing helps here my github repo for sender Github Repo for reciver app for remote screen

here is repo for sender which can send remote cordinates repo of sender

Here is litttle explaination

Sender App Code ( Electron , react )

  //Mouse ClickL Event
  const handleMouseClick = ({
    clientX,
    clientY,
  }) =>{
    //scr element
// const screlement = document.getElementById('remscreen');
// const clientWidth = screlement.offsetWidth;
// const clientHeight = screlement.offsetHeight;

      socket.emit("mouseclickl" , {
        clientX,
        clientY,
        // clientWidth,
        // clientHeight,
        clientWidth: window.innerWidth,
        clientHeight: window.innerHeight,
        room,
      })
  }

  return (
    <>
      <div id="bg" onMouseLeave={() => {}}>
        <div
          className="controlpin"
          id="controlpin"
          ref={controllerPinRef}
          onClick={() => {
            controllerPanel.current.style.visibility = "visible";
            controllerPinRef.current.style.visibility = "hidden";
            controllerPanel.current.style.zIndex = "10";
            controllerPinRef.current.style.zIndex = "8";
          }}
        >
          {" "}
        </div>

        <div
          className="controller"
          id="controller"
          ref={controllerPanel}
          onMouseEnter={() => {
            setIsMouseOnPanel(true);
          }}
          onMouseLeave={() => {}}
        >
          <input
            type="text"
            id="roomInput"
            ref={inputRoom}
            onChange={handleRoomInputChange}
          />
          <button onClick={joinRoom} id="connect_user">
            Connect User{" "}
          </button>
          {/* <input type="text" id='input' ref={inputValue} onChange={(e)=>{ setMessage(e.target.value)}} placeholder='enter message ' /> */}
          {/* <button onClick={sendMessage} >Send Message</button> */}
          <div className="samplethressdiv">
            <input
              type="text"
              id="samplethres"
              onChange={handlesamplethress}
              placeholder="sampling thresold"
            />
            <label htmlFor="samplethres">Sampling Thresold</label>
          </div>
          <div className="disablemousecdiv">
            <input
              type="checkbox"
              id="myCheckbox"
              label="Disable Client Mouse"
              checked={isMouseHide}
              onChange={handleChange}
            />
            <label htmlFor="myCheckbox">Disable Client Mouse</label>
          </div>
          <div className="changeCtrlPos">
            <button
              onClick={() => {
                document.getElementById("controlpin").style.cssText =
                  "right: 1200px";
              }}
            >
              Left
            </button>
            <button
              onClick={() => {
                document.getElementById("controlpin").style.cssText =
                  "left: 1200px";
              }}
            >
              Right
            </button>
          </div>
          <div className="toggerdiv">
            <button
              className="toggerdiv_button"
              onClick={() => {
                if (enableToggler == false) {
                  setEnableToggler(true);
                } else {
                  setEnableToggler(false);
                }
              }}
            >
              Mouse Toggler
            </button>
          </div>
          <div>
            <button onClick={getImage}>Capture Screenshot</button>
          </div>
          <button
            className="closepenlbtn"
            onClick={() => {
              controllerPanel.current.style.visibility = "hidden";
              controllerPinRef.current.style.visibility = "visible";
            }}
          >
            {" "}
            close panel
          </button>
        </div>

        <div
          className="remscreendiv"
          onMouseMove={handleMouseMove}
          onMouseDown={handleMouseDown}
          onMouseUp={handleMouseUp}
          onClick={handleMouseClick}
          onContextMenu={(event) => {
            if (event.button === 2) {
              event.preventDefault();
              socket.emit("mouseclickr", { room });
              console.log("You right-clicked on the element!");
            }
          }}
        >
          <video id="remscreen" ref={remoteVideoRef} />
        </div>

        <video id="myscreen" ref={currentUserVideoRef} />
        <img src={image} alt="screenshot" />
        <h1> Width : {clientWidth}</h1>
        <h1> Height : {clientHeight}</h1>
      </div>
    </>
  );
}

export default App

Here Is Receiver

// //mouse codinates
socket.on("mouse_cord", (data) => {
  const { screen } = require("electron");
  // const primaryDisplay = screen.getPrimaryDisplay();
  // const { width, height } = primaryDisplay.workAreaSize;

     const primaryDisplay = screen.getPrimaryDisplay();
     const screenWidth = primaryDisplay.bounds.width;
     const screenHeight = primaryDisplay.bounds.height;

  // Calculate scaling factors
  const ratioX = screenWidth / data.clientWidth;
  const ratioY = screenHeight / data.clientHeight;
  const scaledX = data.clientX * ratioX;
  const scaledY = data.clientY * ratioY;

  keepMouseOut(data.isMouseHide);

  //  console.log("Mouse is at x:" + mouse.x + " y:" + mouse.y);
  console.log("Hey its client width " + data.clientWidth);
  console.log("Hey its client height " + data.clientHeight);

  // robot.moveMouse(hostX, hostY);
  // console.log(`Current screen width: ${width}`);
  // console.log(`Current screen height: ${height}`);

  // mouse cord active handelling mode
  if (data.enableToggler == true) {
  const { screen } = require("electron");
  // const primaryDisplay = screen.getPrimaryDisplay();
  // const { width, height } = primaryDisplay.workAreaSize;

  const primaryDisplay = screen.getPrimaryDisplay();
  const screenWidth = primaryDisplay.bounds.width;
  const screenHeight = primaryDisplay.bounds.height;

    // Calculate scaling factors
    const ratioX = screenWidth / data.clientWidth;
    const ratioY = screenHeight / data.clientHeight;
    const scaledX = data.clientX * ratioX;
    const scaledY = data.clientY * ratioY;

  console.log("Mouse Cord Data Starts Here")
  console.log("===============================================================")
  console.log("Client Width : " +  data.clientWidth);
  console.log("Client Height : " + data.clientHeight);
  console.log("");
  console.log("============== Client ScreenData ==================");
  console.log("Screen Width : " + screenWidth );
  console.log("Screen Height : " +  screenHeight)
console.log("");
console.log("============== Scaled Count ==================");
console.log("scaled count X :" + scaledX);
console.log("scaled count Y :" + scaledY);



    robot.setMouseDelay(0);
    robot.moveMouse(scaledX, scaledY);
    var mouse = robot.getMousePos();
    robot.moveMouseSmooth(mouse.x, mouse.y);
    console.log("system mouse x" + mouse.x);
    console.log("system mouse y" + mouse.y);
  } else {
    console.log(data.enableToggler + " : toggler ");
  }
});

I know code can bad practise , but issue is relevant

Methods not appearing when printing contract but do appear on Etherscan

I have a goerli testnet contract you can check out here. I’m trying to call executeFlashLoan using a javascript function using web3js, but the code acts as if the function doesn’t exist. However, it’s clearly visible on the etherscan page. Why am I not able to use it? Details below. Here’s how it’s called in the javascript:

const tradeData = await arbitrage.methods.executeFlashLoan(tradeInstructions).encodeABI();

The contract is verified and published on goerli if you want to look over the whole thing, but the pertinent part is here:

...

contract ArbitrageFlashLoan {

...

    function executeFlashLoan(TradeInstruction[] memory _tradeInstructions) external {
    
        // Step 1: Initiate flash loan
        require(_tradeInstructions.length > 0, "No trade instructions added");
    
        address[] memory assets = new address[](_tradeInstructions.length);
        uint256[] memory amounts = new uint256[](_tradeInstructions.length);
        uint256[] memory modes = new uint256[](_tradeInstructions.length);
    
        assets[0] = _tradeInstructions[0].inputToken;
        amounts[0] = _tradeInstructions[0].amountIn;
        modes[0] = 0; // 0 for no debt swap, 1 for debt swap
    
        lendingPool.flashLoan(
            address(this),
            assets,
            amounts,
            modes,
            address(this),  // Use the same address for onBehalfOf
            abi.encodeWithSignature("executeTrades(TradeInstruction[] memory)", _tradeInstructions),
            0
        );
    }
    
    ...

}

...

This always results in the error as so when called via the js function:

TypeError: arbitrage.methods.executeFlashLoan is not a functionat executeTrades (/Users/Me/triBot/dfsBot.js:1088:51)at Subscription.callback (/Users/Me/triBot/dfsBot.js:140:21)at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

When I deployed the contract, I printed it back and the methods section looked like this (shortened but you’ll see what’s important):

methods: {
AAVE_LENDING_POOL_ADDRESS: [Function: bound _createTxObject],'0x878a0135': [Function: bound _createTxObject],'AAVE_LENDING_POOL_ADDRESS()': [Function: bound _createTxObject],
executeFlashLoan: [Function: bound _createTxObject],'0xe7bbc595': [Function: bound _createTxObject],'executeFlashLoan((address,address,bool,uint256,uint256)[])': [Function: bound _createTxObject],
executeTrades: [Function: bound _createTxObject],'0x07ed26d5': [Function: bound _createTxObject],'executeTrades((address,address,bool,uint256,uint256)[])': [Function: bound _createTxObject],
fee: [Function: bound _createTxObject],'0xddca3f43': [Function: bound _createTxObject],'fee()': [Function: bound _createTxObject],
lendingPool: [Function: bound _createTxObject],'0xa59a9973': [Function: bound _createTxObject],'lendingPool()': [Function: bound _createTxObject],

... etc.

However, when I now print methods it looks like this:

{
WETH: [Function: bound _createTxObject],'0xad5c4648': [Function: bound _createTxObject],'WETH()': [Function: bound _createTxObject],
currencies: [Function: bound _createTxObject],'0x6036cba3': [Function: bound _createTxObject],'currencies(address)': [Function: bound _createTxObject],
owner: [Function: bound _createTxObject],'0x8da5cb5b': [Function: bound _createTxObject],'owner()': [Function: bound _createTxObject],
sRouter: [Function: bound _createTxObject],'0x017c64b0': [Function: bound _createTxObject],'sRouter()': [Function: bound _createTxObject],
tokenToMarketId: [Function: bound _createTxObject],'0xb8268788': [Function: bound _createTxObject],'tokenToMarketId(address)': [Function: bound _createTxObject],
uRouter: [Function: bound _createTxObject],'0x5cf39049': [Function: bound _createTxObject],'uRouter()': [Function: bound _createTxObject],
executeTrade: [Function: bound _createTxObject],'0x1395dd23': [Function: bound _createTxObject],'executeTrade(bool,address,address,uint256)': [Function: bound _createTxObject],
callFunction: [Function: bound _createTxObject],'0x8b418713': [Function: bound _createTxObject],'callFunction(address,(address,uint256),bytes)': [Function: bound _createTxObject]}

This is obviously not the same as what I published. However, when you look at Etherscan, all my events and methods are there. Why is this happening? Is the contract just too new and it needs more time?

Dynamic background bar in echarts

I have a boxplot in echarts that looks like this (taken from this example code: https://echarts.apache.org/examples/en/editor.html?c=boxplot-multi):

Existing working example

I am looking to adding a background bar chart for each category of each class. Let’s call it a target. I just tried editing the image to show how am imagining it will look like (on category 0):

How I wished it looked.

The target value should show up in the tooltip as well.

I have looked into bar charts with multiple series and even stacked bar charts. But all the options seems to be either multiple bars side-by-side or stacked on top of each other.

React App deployed on github pages needs a “hard refresh” to update

I’ve struggled quite a while to understand why my React App wouldn’t update after i’d deploy it and finally figured it out thanks to this post’s answer : React App.js doesn’t update when making change but other components do

BUT it still means that i always have to use a “hard refresh” (CTRL+SHIFT+R) on my app’s URL to see the changes after i npm run deploy

Is there a way that i can fix that inside my code ? so that the page refreshes with a normal refres ?

Thanks a lot

Execute escaped Windows command from Node.js on WSL2 Ubuntu

The following command is executed successfully in the CMD shell on Windows:

CMD /S /C " "....Program FilesGoogleChromeApplicationchrome.exe" "

If I try to execute the command from Node.js running inside the WSL, I get an error:

cp.spawn('/mnt/c/Windows/System32/cmd.exe', ['/S', '/C', '" "....Program FilesGoogleChromeApplicationchrome.exe" "'], {stdio: 'inherit'})

The same holds true for the bash shell:

/mnt/c/Windows/System32/cmd.exe /S /C '" "....Program FilesGoogleChromeApplicationchrome.exe" "'

I didn’t found a way so far to apply the correct CMD escaping in Node.js or the bash shell.

Need to separate model creation logic in Mongoose

I need to separate the model creation logic in Mongoose. I can have a category with a parent and without a parent. Tell me how to correctly implement the model.

import mongoose, { model, models, Schema } from "mongoose";

const CategorySchema = new Schema({
    name: { type: String, required: true },
    parent: { type: mongoose.Types.ObjectId, ref: "Category" }
});

const ParentCategorySchema = new Schema({
    name: { type: String, required: true }
});

export const Category = models?.Category || model("Category", CategorySchema);
export const CategoryParent =
    models?.Category || model("Category", ParentCategorySchema);

Selenium webscraping using CSS selectors to extract

I know basic scraping using requests and Beautiful Soup but I don’t know much about Selenium Webdriver. The page uses a lot of JavaScript and I am able to grab everything except image and product URLs. I just want to know how to grab the URLs and other things together and append them into a list.

Assignment 1: Data Extraction (Mandatory) Develop a Python script
(scraper.py) using Selenium and Chromedriver to extract data on
women’s jackets from the Patagonia brand across the following
platforms:

Ensure the script is scalable and adaptable for additional platforms
in the future. Perform necessary post-processing to filter out and
exclude products that do not fall under the category of women’s
jackets. Compile the data into a CSV file with the following columns:

  • product title
  • product URL
  • product image URL
  • product price
  • rating (if available)
  • review count (if available).

Ensure that the CSV file maintains consistency across all platforms,
handling cases where certain information may not be available.
Development Guidelines:

  • The script should use concise CSS paths for efficient data extraction.
  • Include clear documentation and maintain a structure that allows for easy expansion and adaptability.
  • If a platform does not show ratings and reviews in product search results, these two columns can be left blank in the CSV file.
def fetch():
    items = driver.find_element_by_css_selector('#product-search-results > div.row.product-grid.load-more-present')

while True:
    try:
        load_more_button = WebDriverWait(driver, 30).until(EC.presence_of_all_elements_located('#product-search-results > div.row.product-grid.load-more-present > div.col-12.grid-footer > div > div > button')))
        driver.execute_script("arguments[0].scrollIntoView({ behavior: 'auto', block: 'center' });", load_more_button)
        load_more_button.click()
        pages = fetch() 
    except (TimeoutException, NoSuchElementException) as e:
        pages = fetch()
        print("Error:", e)
        break

I tried absolute_links but it did not work. I expected img and products url links.

Should both active and inactive hamburger menu state be a part of a header? | HTML, CSS, VueJS, JS

Should both active and inactive hamburger menu state be a part of a header?

I’m struggling to implement a proper hamburger menu, because I have a specific header functionality, where it has a hide on scroll effect. Which means if I scroll down, the header hides and if I scroll up the header reveals. Considering this, I have a burger menu with both active and inactive states on header, so if I scroll, the burger menu moves with the header. In order to be able to look nice when I open the drawer, I made the header fixed. So now if I click on the burger icon, the header becomes fixed and the drawer reveals. Also, I made the drawer a part of the header, since it basically has the same links and I think sematically it’s more like a mobile nav, not <aside>. However, this approach has a few issues:

  1. I have a hover effect with 0.3s transition on burger icon, and if I click on the icon and drawer appears, if I hover again, the transition is lost for some reason, you can try.

  2. I also have a black overlay with opacity that appears when the drawer reveals, and I want it to be on top of everything, except the drawer. However, since drawer is a part of a header, it’s not possible to do even using z-index (I tried). If you try to open the drawer you’ll see that the logo is on top of the overlay, and it should be under it.

  3. The drawer has to be scrollable, because if we increase the browser font-size we want to be able to see all of the links. The problem is that if you increase the font-size to let’s say 32, for example, in Chrome, you’ll notice that if I scroll down in the drawer, the logo and the burger icon overlap the links and it shouldn’t be like this.

  4. There’s a bug with the overlay. If I click on a button that leads to another section, the black drawer overlay disappears closes along with the drawer, but its closing transition is visible and it looks so weird, like it flies away (click on GO TO SECTION 2 button on drawer to see). It also shouldn’t be like this.

I suppose I’m doing it wrong, I’ve seen people making inactive hamburger menu state a part of a drawer instead, but I don’t know how to implement it in my case with all of these functionalities that I added. Please, help me to find a solution.

Here’s the project reproduction on StackBlitz (I tried to keep it as simple as possible, the design is a bit strange because it’s not the exact copy of the project, but it’s not important). I use Vue 3:

https://stackblitz.com/edit/vitejs-vite-7njjtr?file=src%2Flayout%2FAppHeader.vue,src%2Fcomponent%2FItemBurgerMenu.vue,src%2Fcomponent%2FItemDrawer.vue&terminal=dev

Why can’t I use in Blazor Wasm razor file?

I created a new Blazor Wasm project to test this. In Index.razor, I added the code

<textarea rows="1"
      oninput="adjustRows(this)">
</textarea>

<textarea rows="1"
      oninput="
        this.rows = 1;
        this.rows = Math.round(this.scrollHeight / this.clientHeight);">
</textarea>

<script>
    function adjustRows(textarea) {
        // reset to 1 row to get clientHeight
        textarea.rows = 1;
        textarea.rows = Math.round(textarea.scrollHeight / textarea.clientHeight);
    }
</script>

Both textareas should incerase their height automatically, but only the second one does so. The first one throws the error “Uncaught ReferenceError: adjustRows is not defined at HTMLTextAreaElement.oninput ((index):1:1)”.

What is happening here? Why can’t I use the <script>?

How to solve React native config file error

kindly help me out. I am following a tutorial on react-native app. I created a react-native.config.js file with the following lines of code

module.exports = {
  project: {
    ios: {},
    android: {},
  },
  assets: ['./src/assets'],
};

There is a syntax error as shown in the screenshot and when I click “ctrl + .” to disable disable prettier/prettier and run “npx react-native-asset” it shows the error in the second screenshot

module.exports = {
  arrowParens: 'avoid',
  bracketSameLine: true,
  bracketSpacing: false,
  singleQuote: true,
  trailingComma: 'all',
  endOfLine: 'auto',
};

here is my prettierrc.js file

enter image description here
The code has syntax error