Polymer / vscode-plugin

Provides autocompletion, linting, and more for web components.
Other
74 stars 11 forks source link

Polymer IDE should only lint polymer projects #65

Closed coreyfarrell closed 6 years ago

coreyfarrell commented 7 years ago

polymer lint shows an error for nodejs executable scripts: bin/example-script.js(0,0) error [parse-error] - Unexpected character '#'

In some cases this error is produced in projects that have nothing to do with polymer. I have not found a way to disable vscode-plugin by project. My belief is that this extension should not run unless polymer.json exists.

This is related to Polymer/polymer-cli#711.

rictic commented 7 years ago

This specific error is also related to https://github.com/Polymer/polymer-analyzer/issues/435

coreyfarrell commented 7 years ago

I've found a partial workaround for this issue. In VSCode from your node.js project, go to Extensions (Ctrl-Shift-X), click the settings gear icon next to Polymer IDE, then click "Disable (workspace)". Click "Reload" to restart the current VSCode window and complete the disable action.

To my knowledge there is no workaround for Polymer projects that also contain nodejs scripts, if you want vscode polymer linting you just have to live with the error until it's fixed.