AtomLinter / linter-tslint

Typescript linter for AtomLinter
64 stars 23 forks source link

Uncaught TypeError: _this.lint is not a function #161

Closed samartioli closed 7 years ago

samartioli commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.16.0 x64 Electron: 1.3.13 OS: Mac OS X 10.12.3 Thrown From: linter-tslint package 1.2.0

Stack Trace

Uncaught TypeError: _this.lint is not a function

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:1045

TypeError: _this.lint is not a function
    at /packages/linter-tslint/lib/main.js:76:20
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at TextBuffer.module.exports.TextBuffer.saveAs (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1092:27)
    at TextBuffer.module.exports.TextBuffer.save (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1058:19)
    at TextEditor.module.exports.TextEditor.save (/app.asar/src/text-editor.js:920:26)
    at Pane.module.exports.Pane.saveItem (/app.asar/src/pane.js:753:18)
    at Pane.saveItem (/app.asar/src/pane.js:3:59)
    at Pane.module.exports.Pane.saveActiveItem (/app.asar/src/pane.js:736:19)
    at Workspace.saveActivePaneItem (/app.asar/src/workspace.js:851:33)
    at /app.asar/src/register-default-commands.js:225:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands

     -2:05.9.0 core:paste (input.hidden-input)
     -2:03.0 autocomplete-plus:cancel (input.hidden-input)
     -1:41.2.0 find-and-replace:select-next (input.hidden-input)
     -1:39 autocomplete-plus:cancel (input.hidden-input)
  2x -1:31.5.0 core:copy (input.hidden-input)
     -1:25 core:paste (input.hidden-input)
     -1:22 core:backspace (input.hidden-input)
  2x -1:20.8.0 core:save (input.hidden-input)
     -0:57.8.0 settings-view:open (input.hidden-input)
     -0:19.4.0 core:copy (input.hidden-input)
     -0:14.2.0 core:paste (input.hidden-input)
     -0:11.1.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:10.9.0 core:move-left (input.hidden-input)
     -0:10.6.0 core:move-right (input.hidden-input)
  2x -0:10.3.0 core:backspace (input.hidden-input)
     -0:09.8.0 core:save (input.hidden-input)

Non-Core Packages

aligner 0.22.3 
atom-beautify 0.29.23 
atom-easy-jsdoc 4.12.1 
atom-jade 0.3.0 
atom-jasmine 0.8.1 
atom-prettify 0.1.3 
atom-typescript 11.0.3 
autocomplete-lodash 0.2.3 
autocomplete-python 1.8.63 
busy-signal 1.4.1 
change-case 0.6.5 
color-picker 2.2.5 
editor-settings 1.1.2 
escape-utils 0.5.3 
esformatter 2.2.1 
file-icons 2.1.4 
hex 0.6.2 
html2jade-plus 1.0.0 
Hydrogen 1.12.0 
indent-guide-improved 1.4.12 
intentions 1.1.2 
jade-beautify 0.1.5 
json-converter 0.2.4 
language-docker 1.1.7 
language-dots 0.0.4 
language-groovy 0.6.0 
language-haproxy 0.6.1 
language-jade 0.7.2 
language-logstash 0.1.7 
language-pug 0.0.21 
language-rivescript 1.0.0 
linter 2.1.4 
linter-eslint 8.1.6 
linter-flake8 2.2.1 
linter-js-yaml 1.2.7 
linter-jsonlint 1.3.0 
linter-pug 1.3.1 
linter-tslint 1.2.0 
linter-ui-default 1.2.3 
markdown-table-formatter 2.9.0 
markdown-writer 2.6.4 
merge-conflicts 1.4.4 
pdf-view 0.57.0 
pigments 0.39.1 
pretty-json 1.6.3 
python-tools 0.6.9 
snippets-jade 0.2.2 
sort-lines 0.14.0 
Sublime-Style-Column-Selection 1.7.4 
svg-preview 0.11.0 
tabs-to-spaces 1.0.3 
tree-view-filter 0.4.1 
samartioli commented 7 years ago

Restarted Atom and it seems to be working now

vladimir-tikhonov commented 7 years ago

Same issue here, only when "Fix errors on save" option is active. Restart doesn't help.

Xapphire13 commented 7 years ago

Good catch, I missed a bit when I moved the code to use workers. Working on a fix and will publish a fix today

Xapphire13 commented 7 years ago

Should be fine as of v1.2.1. Let me know if you have further issues. Thanks!

vladimir-tikhonov commented 7 years ago

The issue is no longer reproducible in v1.2.1. Thank you very much @Xapphire13 :+1: