Skip to content

Unable to support the Stylint Sublime Text plugin #453

@markalfred

Description

@markalfred

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions