Skip to content

Commit 1acf430

Browse files
committed
Pass '--stdin-filename' only for saved files
1 parent 2618cf5 commit 1acf430

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

linter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ class ESLint(NodeLinter):
2323
"""Provides an interface to the eslint executable."""
2424

2525
npm_name = 'eslint'
26-
cmd = 'eslint --format json --stdin --stdin-filename ${file}'
26+
cmd = 'eslint --format json --stdin'
2727

2828
missing_config_regex = re.compile(
2929
r'^(.*?)\r?\n\w*(ESLint couldn\'t find a configuration file.)',
3030
re.DOTALL
3131
)
3232
line_col_base = (1, 1)
3333
defaults = {
34-
'selector': 'source.js - meta.attribute-with-value'
34+
'selector': 'source.js - meta.attribute-with-value',
35+
'--stdin-filename': '${file}'
3536
}
3637

3738
def on_stderr(self, stderr):

0 commit comments

Comments
 (0)