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

Unable to support the Stylint Sublime Text plugin #453

Open
markalfred opened this issue Jul 26, 2019 · 0 comments
Open

Unable to support the Stylint Sublime Text plugin #453

markalfred opened this issue Jul 26, 2019 · 0 comments

Comments

@markalfred
Copy link

markalfred commented Jul 26, 2019

Update: I have opened #454 to try to resolve this.


Hi, I own and support the Stylint Sublime Text plugin, and I'm running into a number of issues. The issues stem from these facts:

  1. SublimeLinter runs a regex over linter warnings/errors to do its work
  2. The regex works because it can expect its inputs to be in a particular format
  3. Stylint allows users to customize the format of the reported warnings/errors
  4. Stylint does not allow the custom format to be overridden without also overriding all of the user's rules

If any of these givens are incorrect, please let me know, but this seems like a problem for any editor plugin trying to integrate with Stylint.

The best solution, in my opinion, would be to allow an integration or user to define custom formatting options in the CLI, which can override the user-defined format in .stylintrc, without also overriding their rules. This comes with the added benefit of making the output more consistent and simple to parse.

Something along these lines:

$ stylint --reporterOptions='{
  "columns": ["file", "lineData", "severity", "rule", "description"],
  "columnSplitter": "|"
}'

The only other option for me would be to use a reporter like the stylint-json-reporter. However, since Sublime plugins are python-based, it's not simple to manage node dependencies that go along with a package — I'd have to ask every user to install stylint-json-reporter alongside the Sublime plugin and stylint itself, and I'm sure it'd cause friction.

Does the above solution seem feasible?

Thank you!


Note to self: #429 might get us partly there...

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

Successfully merging a pull request may close this issue.

1 participant