Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint error occurred with "@typescript-eslint/no-extra-semi" #8953

Closed
9 tasks
HuihuiWu-Microsoft opened this issue May 9, 2023 · 12 comments
Closed
9 tasks
Labels
area:spfx Category: SharePoint Framework (not extensions related) Needs: Attention 👋 Original poster responded to request for feedback, awaiting attention from Microsoft / community. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@HuihuiWu-Microsoft
Copy link

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version Edge Version 113.0.1774.35 (Official build) (64-bit)
  • SPFx version 1.16.1
  • Node.js version 16.15.0
  • etc

Describe the bug / error

Lint error occurred when running gulp tasks(gulp serve/ gulp bundle) with SPFx v1.16.1

Steps to reproduce

  1. Install SPFx v1.16.1 globally 'npm install -g @microsoft/generator-sharepoint@1.16.1'
  2. Scaffold SPFx project with 'yo @microsoft/sharepoint' and 'npm install' is automatically executed
  3. Run 'gulp serve' or 'gulp bundle' and got following error
    image

Expected behavior

I should be able to run gulp tasks to debug or bundle package successfully.

@HuihuiWu-Microsoft HuihuiWu-Microsoft added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label May 9, 2023
@ghost
Copy link

ghost commented May 9, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 Awaiting categorization and initial review. label May 9, 2023
@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented May 9, 2023

@HuihuiWu-Microsoft - could you please check if the issue still repro-es on the latest version of SPFx (1.17.2)?

@AJIXuMuK AJIXuMuK added area:spfx Category: SharePoint Framework (not extensions related) Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels May 9, 2023
@gavinbarron
Copy link

Just got this exact error on a totally clean install of @microsoft/generator-sharepoint@1.16.1
Not looking to use v1.17.2 yet as I need to validate a 1.16 usecase.

@gavinbarron
Copy link

gavinbarron commented May 9, 2023

FWIW as a hackish work-around I as able to get building by disabling a couple of rules in the .eslintrc file by adding these lines to the start of the rules object:

      rules: {
        "@typescript-eslint/no-extra-semi": 0,
        "@typescript-eslint/no-empty-function" : 0,

(thank you for better exposing hooks to alter the eslint config, this a positive step)

@HuihuiWu-Microsoft
Copy link
Author

Hi @AJIXuMuK , I tried SPFx v1.17.2 and doesn't have the issue. Will you fix the issue on v1.16.1 since some developers might still use the legacy version?

@ghost ghost added Needs: Attention 👋 Original poster responded to request for feedback, awaiting attention from Microsoft / community. and removed Needs: Author Feedback Awaiting response from the original poster of the issue. Marked as stale if no activity for 7 days. labels May 10, 2023
@Eiglimar
Copy link

@gavinbarron thx ma man! build success here doing that!

@AJIXuMuK
Copy link
Collaborator

@HuihuiWu-Microsoft - no. It doesn't work like that. All fixed appear as a new version. So if there even need for a fix it would be 1.17.x

@AJIXuMuK
Copy link
Collaborator

I can repro it on 1.16.1.
Seems like issue with some bumped dependency.
Although we won't fix 1.16.1 version as the problem doesn't exist in 1.17.2 (which is the latest one) we will look into the problem to avoid such thing in future.

@gavinbarron
Copy link

@Eiglimar just be aware that those two linting rules are now disabled and won't be shown in your editor or detected. Those two rules specifically are not a big deal, but just something to be aware of.

@HuihuiWu-Microsoft
Copy link
Author

Thanks @AJIXuMuK!

@AJIXuMuK
Copy link
Collaborator

@HuihuiWu-Microsoft @gavinbarron @Eiglimar - just to provide another workaround: do npm i --save-dev --save-exact eslint@8.28.0

@ghost
Copy link

ghost commented May 23, 2023

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@SharePoint SharePoint locked as resolved and limited conversation to collaborators May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:spfx Category: SharePoint Framework (not extensions related) Needs: Attention 👋 Original poster responded to request for feedback, awaiting attention from Microsoft / community. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

4 participants