eslint-plugin-svelte3 icon indicating copy to clipboard operation
eslint-plugin-svelte3 copied to clipboard

eslint-disable/enable in templates

Open jayvdb opened this issue 4 years ago • 4 comments

https://github.com/sveltejs/eslint-plugin-svelte3/issues/22 appeared to request this, but it looks like it was resolved in a different way.

I think it would be helpful to have support for <!-- eslint-disable/enable ... --> in the templates to disable rules around specific parts of a template.

jayvdb avatar Oct 01 '21 02:10 jayvdb

This would be helpful as a workaround for my just-reported #174. Right now I think my only fix is to exclude my left/top/width variable names.

johnnysprinkles avatar Mar 30 '22 04:03 johnnysprinkles

I just discovered the svelte-ignore magic comments merged in https://github.com/sveltejs/svelte/pull/3351, which addressed the a11y-autofocus warning in my login form. They only apply to the following element (as opposed to the multi-line surround proposed here), but it may be sufficient for most use cases.

I'm new to this environment, so apologies if svelte-ignore and the proposed eslint-disable are covering different validators.

cbetti avatar Jul 25 '22 13:07 cbetti

I would like to fix this problem - I opened a question on StackOverflow about this issue here: https://stackoverflow.com/q/73747454/173630

nikolas avatar Sep 16 '22 15:09 nikolas

Actually, I just discovered the eslint-plugin-svelte plugin works fine with <!-- eslint-disable --> directives in svelte templates, so I'll just use that instead.

https://github.com/ota-meshi/eslint-plugin-svelte

nikolas avatar Sep 16 '22 17:09 nikolas