Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Not working at all [OSX] #221

Closed
sarink opened this issue Mar 26, 2018 · 8 comments · Fixed by #223
Closed

Not working at all [OSX] #221

sarink opened this issue Mar 26, 2018 · 8 comments · Fixed by #223

Comments

@sarink
Copy link

sarink commented Mar 26, 2018

plugin version: 1.9.0

atom version: 1.25.0

tslint.json

{
  "extends": "tslint-config-airbnb"
}
:$ npm get prefix
/Users/sarink/.nvm/versions/node/v8.7.0

:$ ls node_modules | grep tslint
tslint
tslint-config-airbnb
tslint-consistent-codestyle
tslint-eslint-rules
tslint-microsoft-contrib

:$ cat package.json | grep tslint
    "tslint": "^5.9.1",
    "tslint-config-airbnb": "^5.4.2",

screen shot 2018-03-26 at 4 57 55 pm

Produces no warnings, it's not even clear if the linter is running at all. Everything was working fine until a week or two ago?

Running tslint manually from the command line works fine.

Any ideas?

@sarink sarink changed the title Not working at all Not working at all [OSX] Mar 26, 2018
@Xapphire13
Copy link
Contributor

Can you open the atom console (CMD+OPT+I on Mac), open a file that should have lint issues, and see if anything shows up there?

Make sure the log level is verbose just to be safe:

image

@sarink
Copy link
Author

sarink commented Mar 27, 2018

/Users/sarink/.atom/packages/linter-tslint/lib/workerHelper.js:46 Uncaught (in promise) TypeError: Cannot read property 'on' of undefined
    at /Users/sarink/.atom/packages/linter-tslint/lib/workerHelper.js:34:34
    at Promise (<anonymous>)
    at Object.requestJob (/Users/sarink/.atom/packages/linter-tslint/lib/workerHelper.js:33:10)
    at /Users/sarink/.atom/packages/linter-tslint/lib/main.js:83:34
    at Generator.next (<anonymous>)
    at step (/Users/sarink/.atom/packages/linter-tslint/lib/main.js:9:273)
    at /Users/sarink/.atom/packages/linter-tslint/lib/main.js:9:443
    at Promise (<anonymous>)
    at /Users/sarink/.atom/packages/linter-tslint/lib/main.js:9:99
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1359:31
    at <anonymous>

@Xapphire13
Copy link
Contributor

Xapphire13 commented Mar 28, 2018

Interesting, looks like an edge case, your editor is triggering the fix on save before the worker is created.

The expectation would be that the provideLinter() method would be called before a save was possible. Seems this isn't the case and the if (!this.worker) code should be added to the fixOnSave

@nrkroeker
Copy link

nrkroeker commented Apr 12, 2018

Is there a way to get this fix? I have the exact same error, and I know it was only resolved within the last couple weeks but since there isn't a new release, would I need to clone this repository instead of using the apm version?

Extra info - I'm on Windows 10, atom version 1.25, plugin version 1.9.0

@sarink
Copy link
Author

sarink commented Apr 12, 2018

In the meantime, I wrote a custom command-line lint watcher out of tslint and chokidar. Here it is, if anyone's interested (added to package.json):

    "lint": "tslint --project .",
    "lint:watch": "SHELL=/bin/bash chokidar tslint.json ./**/*.ts ./**/*.tsx -c \"npm run lint\" --initial --verbose",

@nrkroeker
Copy link

@sarink I’m unfamiliar with lint watchers, does it only affect tslint’s functionality when run from the command line? Or in atom as well?

@Xapphire13
Copy link
Contributor

Sorry, didn't get around to making a release. I will get onto that now

@Xapphire13
Copy link
Contributor

Just published version 1.9.1. Please try with that version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants