Skip to content

Commit fb99eb6

Browse files
authored
Merge pull request #245 from SublimeLinter/better-deprecations
Look for `DeprecationWarning` in stderr
2 parents 7e1bab7 + e8c9496 commit fb99eb6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

linter.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ class ESLint(NodeLinter):
2929
r'^(.*?)\r?\n\w*(ESLint couldn\'t find a configuration file.)',
3030
re.DOTALL
3131
)
32-
crash_regex = re.compile(
33-
r'^(.*?)\r?\n\w*(Oops! Something went wrong!)',
34-
re.DOTALL
35-
)
3632
line_col_base = (1, 1)
3733
defaults = {
3834
'selector': 'source.js - meta.attribute-with-value'
@@ -43,7 +39,10 @@ def on_stderr(self, stderr):
4339
if self.missing_config_regex.match(stderr):
4440
logger.warning(stderr)
4541
self.notify_failure()
46-
elif 'in the next version' in stderr: # is that a proper deprecation?
42+
elif (
43+
'DeprecationWarning' in stderr or
44+
'in the next version' in stderr # is that a proper deprecation?
45+
):
4746
logger.warning(stderr)
4847
else:
4948
logger.error(stderr)

0 commit comments

Comments
 (0)