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

eslint-disable/enable in templates #134

Open
jayvdb opened this issue Oct 1, 2021 · 4 comments
Open

eslint-disable/enable in templates #134

jayvdb opened this issue Oct 1, 2021 · 4 comments

Comments

@jayvdb
Copy link

jayvdb commented Oct 1, 2021

#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.

@johnnysprinkles
Copy link

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.

@cbetti
Copy link

cbetti commented Jul 25, 2022

I just discovered the svelte-ignore magic comments merged in sveltejs/svelte#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.

@nikolas
Copy link

nikolas commented Sep 16, 2022

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

@nikolas
Copy link

nikolas commented Sep 16, 2022

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 added a commit to ccnmtl/3demos that referenced this issue Sep 16, 2022
Even though it's the "official" svelte eslint plugin,
`eslint-plugin-svelte` has problems and is in the process of
deprecation:

* sveltejs/eslint-plugin-svelte3#134
* sveltejs/eslint-plugin-svelte3#184
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

4 participants