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

[JS] Invalid syntax when using &&= #410

Open
larmcr opened this issue May 13, 2022 · 0 comments
Open

[JS] Invalid syntax when using &&= #410

larmcr opened this issue May 13, 2022 · 0 comments

Comments

@larmcr
Copy link

larmcr commented May 13, 2022

  • Operating System (+Version): Windows 10
  • VS Code Version: 1.67.1
  • beautify Version: 1.5.0

VS Code:

{
  "workbench.iconTheme": "material-icon-theme",
  "workbench.colorTheme": "Nord",
  "editor.fontFamily": "Courier New",
  "editor.fontSize": 15,
  "editor.tabSize": 2,
  "editor.renderWhitespace": "all",
  "dateTime.customFormat": "[ww]ww.d - dddd, MMMM Do, YYYY",
  "git.enableSmartCommit": true,
  "diffEditor.ignoreTrimWhitespace": true,
  "explorer.sortOrder": "type",
  "markdown-pdf.format": "Letter",
  "markdown-pdf.headerTemplate": "<div style=\"font-size: 1px; margin: 0 auto;\"></div>",
  "markdown-pdf.breaks": true,
  "terminal.integrated.rendererType": "dom",
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
  "explorer.confirmDelete": false,
  "editor.minimap.enabled": false,
  "[go]": {
    "editor.insertSpaces": false,
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.organizeImports": true
    }
  },
  "terminal.integrated.tabs.enabled": true,
  "terminal.integrated.tabs.location": "left",
  "terminal.integrated.defaultProfile.windows": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe (migrated)",
  "workbench.startupEditor": "newUntitledFile",
  "git-graph.dialog.fetchRemote.prune": true,
  "go.toolsManagement.autoUpdate": true,
  "terminal.integrated.profiles.windows": {
    "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe (migrated)": {
      "path": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
      "args": []
    }
  },
  "workbench.editorAssociations": {
    "*.ipynb": "jupyter-notebook",
    "git-rebase-todo": "gitlens.rebase"
  },
  "notebook.cellToolbarLocation": {
    "default": "right",
    "jupyter-notebook": "left"
  },
  "diffEditor.maxComputationTime": 0,
  "workbench.sideBar.location": "right",
  "extensions.ignoreRecommendations": true,
  "editor.foldingMaximumRegions": 10000,
  "window.zoomLevel": 1,
  "editor.fontWeight": "normal",
  // "[javascript]": {
  //   "editor.defaultFormatter": "vscode.typescript-language-features"
  // },
}

Action performed

Format javascript file with HookyQR.beautifyFile command:

((a, b) => { return a &&= b })(true, false)

Expected results

&& and = should not include any space (valid syntax):

((a, b) => {
  return a &&= b
})(true, false)

Actual results

Space between && and = (invalid syntax) :

((a, b) => {
  return a && = b
})(true, false)
@larmcr larmcr changed the title []Invalid syntax when using &&= [JS] Invalid syntax when using &&= May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant