-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
console and Promise reported as not defined #918
Comments
The Svelte for VS Code extension does not provide any form of diagnostics to JS/TS files. What are the error messages / codes exactly? What is the project type where you are getting this error (SvelteKit, ESLint yes/no, etc)? |
Ah, sorry. The error is from ESLint. An example message is "'console' is not defined. eslint(no-undef)". env: {
es6: true, // for Promise
node: true // for console
}, Perhaps these settings should be in |
Else it will complain about uses of console.log etc. Added node/browser/es2017 for the 90% use case. Fixes sveltejs/language-tools#918
Else it will complain about uses of console.log etc. Added node/browser/es2017 for the 90% use case. Fixes sveltejs/language-tools#918
Describe the bug
When editing a
.js
file insrc/lib
, if I useconsole.log
orPromise.all
they work, but VS Code reportsconsole
andPromise
as not defined.To Reproduce
Steps to reproduce the behavior:
Create the file
src/lib/demo.js
containing the following:Notice that
console
andPromise
have squiggly red lines below them.Expected behavior
VS Code should recognize these names as being defined.
Screenshots
System (please complete the following information):
The text was updated successfully, but these errors were encountered: