Skip to content

Use ESLint to validate and fix indentation#45

Closed
edg2s wants to merge 3 commits intoazeemba:masterfrom
edg2s:indent2
Closed

Use ESLint to validate and fix indentation#45
edg2s wants to merge 3 commits intoazeemba:masterfrom
edg2s:indent2

Conversation

@edg2s
Copy link
Contributor

@edg2s edg2s commented May 12, 2020

No description provided.

@AdrieanKhisbe
Copy link
Collaborator

Hello @edg2s :)
Was just wondering if you closed you PR because you consider #39 would fulfill your need, or if there was any other reason.

@edg2s
Copy link
Contributor Author

edg2s commented May 20, 2020

This was an alternate approach to #40 which included the ability to fix errors by using a similar approach to #39, however the limitation is that it uses the same rules as your regular linter.

@edg2s
Copy link
Contributor Author

edg2s commented May 20, 2020

This approach on its own is very sensible, and with a proper config of "overrides" could work well, but it essentially says "treat this file as JS, and continue to lint as normal (with some custom changes for quote style etc.)", but the API for this plugin is to introduce new rules e.g. "plugin:json/foo" so I'm not sure it would be appropriate for this repo.

@edg2s
Copy link
Contributor Author

edg2s commented May 20, 2020

#40 on the other hand behaves more like the JSON validation rules in the plugin, namely executing a new lint run for each file, and piping through any errors.

The downside of #40 is it doesn't support fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants