Skip to content

🐞 [Bug]: Upgrade action issue #60

@Saurabh7019

Description

@Saurabh7019

📝 Error caused by newline characters in overrides JSON while upgrading SPFx solution using vscode-viva upgrade action

I am using vscode-viva to upgrade an SPFx solution. While updating the .eslintrc.js file as suggested in the upgrade report, I noticed an issue where newline characters ("\n") are being displayed as line breaks in the overrides JSON object. This is corrupting the file and causing the following error during the solution build.

Cannot read config file: C:\RnD\helloWorld\.eslintrc.js
Error: Invalid or unexpected token

👣 Steps To Reproduce

Steps to reproduce the behavior:

  1. Open Viva Connection Toolkit extension in a SPFX project (v.1.15.0)
  2. Click on the 'Upgrade' action.
  3. Follow the instruction in the spfx.upgrade.md report.
  4. Notice the line breaks in .eslintrc.js
    image

📜 Expected behavior

The value should be displayed without newline characters ("\n") interpreted as line breaks.
image

💻 Desktop (please complete the following information):

  • OS: Microsoft Windows 10.0.22000

🤔 Additional context

I am certain that it is a cli-microsoft365 issue, but I was unable to reproduce it with CLI v6.9.0. Therefore, logging the issue here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions