enuchi / React-Google-Apps-Script

This is your boilerplate project for developing React apps inside Google Sheets, Docs, Forms and Slides projects. It's perfect for personal projects and for publishing complex add-ons in the Google Workspace Marketplace.
MIT License
1.34k stars 178 forks source link

Parsing error: Unexpected reserved word 'interface'. #177

Closed saadbahir closed 1 year ago

saadbahir commented 1 year ago

I am running in this eslint errors in the typescript files with an interface

Parsing error: Unexpected reserved word 'interface'.

interface FormInputProps {
  submitNewSheet: (sheetName: string) => {
    name: string;
    index: number;
    isActive: boolean;
  };
}

Has anyone encountered a similar error?

enuchi commented 1 year ago

Not sure as it works for me with my setup. Maybe you can share which code editor and OS you're using?

Also does it happen for you with a fresh clone and install of this repo?

saadbahir commented 1 year ago

thanks @enuchi for your answer! I am using VScode with MacOS Big Sur v11

This indeed happens with a fresh clone and install of this repo

saadbahir commented 1 year ago

@enuchi I fixed it by replacing

"parser": "@babel/eslint-parser"

by

"parser": "@typescript-eslint/parser"

in the file /src/client/.eslintrc.json