Skip to content

A strict script-indent compatible with indent #418

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

Closed
mitar opened this issue Mar 3, 2018 · 3 comments
Closed

A strict script-indent compatible with indent #418

mitar opened this issue Mar 3, 2018 · 3 comments

Comments

@mitar
Copy link

mitar commented Mar 3, 2018

It seems that script-indent has much less configuration options than indent? I like the strict indent nature.

It seems you cannot use vue/script-indent just for <script> tags, while keeping indent for all other code?

@LukeShu
Copy link
Contributor

LukeShu commented Mar 10, 2018

It seems you cannot use vue/script-indent just for <script> tags, while keeping indent for all other code?

Is this what you are looking for? Turn "indent" off only for .vue files?

module.exports = {
	rules: {
		"indent": ["warn", "tab"],
	},
	overrides: [
		{
			files: ["*.vue"],
			rules: {
				"indent": "off",
				"vue/script-indent": ["warn", "tab"],
			}
		}
	]
};

@mitar
Copy link
Author

mitar commented Mar 10, 2018

Interesting. I didn't know this. Thanks!

I think this resolved this issue. There will still be an issue that code inside <script> tags will have less strict indent nature. :-(

@michalsnik
Copy link
Member

Cool! If you have proposition regarding what we could add in this rule just post another issue and we can discuss it there @mitar :)

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

3 participants