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

Question: Format linebreak-style, eol-last and indent #16

Open
wehrstedt opened this issue Jun 17, 2020 · 3 comments
Open

Question: Format linebreak-style, eol-last and indent #16

wehrstedt opened this issue Jun 17, 2020 · 3 comments

Comments

@wehrstedt
Copy link

wehrstedt commented Jun 17, 2020

Hi, I found this plugin and hoped that this will support formatting the linebreak-style, eol-last and indent.

I added the following to my .eslintrc.json file:

		"linebreak-style": [
			"error",
			"windows"
		],
		"eol-last": [
			"error",
			"always"
		],
		"indent": [
			"error",
			"tab",
		],

and running eslint with eslint . --ext .js,.json

The settings gets applied to my javascript files, but not to json files. Are these options not supported?

@kuceb
Copy link
Owner

kuceb commented Aug 20, 2020

sorry, the plugin currently doesn't take those rules into account.

currently it'll always add eol-last, but not windows linebreak style or tab indent. A setting could be added to use tabs instead of space indent, however

@stuta
Copy link

stuta commented Feb 2, 2021

A setting could be added to use tabs instead of space indent, however

This would be very much needed. I don't want to change thousands of JSON files because of this.

@vanowm
Copy link

vanowm commented Sep 1, 2023

Just throwing my 2¢ to make it obey formatting rules. At least allow us disable indentation error:

Format Error: unexpected "\t" eslint(JSON format)

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