-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
indent rule requires that <script> elements be indented #155
Comments
Yeah. Adding option to the indent rule sounds good to me. I think it makes sense to add an option like |
I've started working on this, quick question for you @ota-meshi: Is there a way to run just a single test currently? I haven't found one so far and it's making iterating on this a bit slower than I'd like. |
@tivac Thank you for working on it! yarn mocha "tests/src/**/indent.ts" --reporter dot --timeout 60000 If you want to test only |
I have opened a PR to explain how to test the rule. #172 |
I got it running just the one rule, thanks for updating the docs. No matter what I try though I don't seem to be able to get my main...tivac:eslint-svelte:indent-script-option Dropping that there in case you see something obvious, I'll keep bashing my head against it for now. EDIT: Of course, right after I said that I figured out the issue 🤦🏻♂️ |
This is how I want to write our svelte components:
But if I enable the indent rule, it really wants me to do this:
I can disable it using
{ ignoredNodes : [ "SvelteScriptElement" ] }
but it means that none of the indentation for any direct children will be checked, which is kind of a bummer. I'm sure this is a bit annoying of an ask, but would you be open to adding a new option where a user can define the level of indentation they want specifically for<script>
s? It could default to1
, so it wouldn't be a breaking change.If you're open to this proposal I'd be thrilled to figure out how to send a PR for it.
The text was updated successfully, but these errors were encountered: