Skip to content

Instantly share code, notes, and snippets.

@marekdedic
Last active January 2, 2023 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marekdedic/7394ecd403fdcda3c516a7ea76c944be to your computer and use it in GitHub Desktop.
Save marekdedic/7394ecd403fdcda3c516a7ea76c944be to your computer and use it in GitHub Desktop.
eslint-plugin-svelte false positive (sveltejs/eslint-plugin-svelte#335)
{
"parser": "svelte-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [".svelte"]
},
"rules": {
"no-undef": "error"
}
}
<script lang="ts">
const contentPromise = new Promise();
</script>
{#if false}
{:else if true}
{#await contentPromise then _}
{/await}
{/if}
{
"scripts": {
"lint": "eslint --color 'Error.svelte'"
},
"dependencies": {
"@typescript-eslint/parser": "^5.36.1",
"eslint": "^8.23.0",
"eslint-plugin-svelte": "^2.8.0",
"svelte": "^3.50.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment