Closed educcjr closed 7 years ago
thank you so much for this! i can confirm this fix works for me
I confirm that this fixes it! Thanks @educcjr !
Until this is merged by @ricardofbarros, you can install manually:
apm install educcjr/linter-js-standard
I have fixed this in https://github.com/ricardofbarros/linter-js-standard/commit/e51f30bedba39d028431f0ac71bb4f7aed6db5cf.
I have now swapped onDidChangeActivePaneItem()
with observeTextEditors()
which calls back with a text editor instance even if the active pane is not a text editor (e.g. the tree view). I have chosen this over simply setting { style: { cmd: 'no-style' }, opts: {} }
since this would disable linting if, for example, you open a file in a pending tab from the tree view upon opening Atom.
Anyhow, thank you for taking the time to debug this.
I think this will solve the issue #179.
Whenever a text editor panel is activated, the 'lint' function (lib/linter-js-standard.js) checks if 'text-editor' key has values. But if there isn't any active text editor when Atom starts, the 'activate' function (lib/init.js) won't assign any value to the 'text-editor' key.
Basically the warning would always show up if Atom didn't initialize with an active text editor.