It took me a while, but I got eslint working for both .js and .ts files.
Here's my config.Part of the trouble was that I didn't even know the linter was failing with previous versions of my config. I'm so used to vim running the linter that it didn't even occur to me to run eslint directly. When I did, I saw the config errors.
Then, I found out that the Typescript linting plugin needs eslint as a peer dependency in the local package, even if you run eslint globally, like I do.
Finally, vim won't show linter error in a file unless it understand how to do syntax highlighting for that kind of file. So, even though I don't really care about syntax highlighting, I installed
typescript-vim.
I gotta say, it's really nice that in vim 8 and on, if you want to install a plugin, all you do is clone a git repo to a particular directory. Vundle and pathogen were such a hassle that I decided to just stop using plugins altogether, until now.