Skip to content

Commit

Permalink
Merge pull request #8 from jonstaryuk/master
Browse files Browse the repository at this point in the history
Update regex and allow linting Vue component files
  • Loading branch information
markalfred authored Nov 1, 2018
2 parents b977b62 + 0b13092 commit 8e3cd57
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# License: MIT

"""This module exports the Stylint plugin class."""
"""Exports the Stylint plugin class."""

from SublimeLinter.lint import NodeLinter, util

Expand All @@ -17,7 +17,8 @@ class Stylint(NodeLinter):
"""Provides an interface to stylint."""

npm_name = 'stylint'
syntax = 'stylus'
syntax = ('stylus', 'vue')
selectors = {'vue': 'source.stylus.embedded.html'}
cmd = 'stylint @ *'
executable = 'stylint'
version_requirement = '>= 1.5.0'
Expand All @@ -26,7 +27,7 @@ class Stylint(NodeLinter):
# /path/to/file/example.styl
^.*$\s*
# 177:24 colors warning hexidecimal color should be a variable
^(?P<line>\d+):?(?P<near>\d+)?\s*\w+\s*((?P<warning>warning)|(?P<error>error))\s*(?P<message>.+)$\s*
^(?P<line>\d+):?(?P<col>\d+)?\s*((?P<warning>warning)|(?P<error>error))\s*(?P<message>.+)$\s*
'''
multiline = True
error_stream = util.STREAM_STDOUT
Expand Down

0 comments on commit 8e3cd57

Please sign in to comment.