14

Is it possible for VS Code to validate code against Babel w/ plugins? I'm trying out some new proposed syntax features for Javascript and would like the linter to understand the new syntax.

I'm using Babel 7.

Maybe it possible for VS Code to check for errors on the compiled file then use sourcemaps highlight errors in code?

Babakness
  • 2,954
  • 3
  • 17
  • 28
  • 3
    Do you have any additional leads here? I want to use `@babel/plugin-proposal-optional-chaining` in my code. I'm using latest ESLint (with `babel-eslint` as the parser) instead of the default VS Code linter... and that's working well. But the optional-changing syntax isn't understood by the VS Code language server... and so autocomplete breaks. – Jesse Grosjean Feb 02 '18 at 19:37
  • @JesseGrosjean What guide did you use? I have yet to try this one but it looks promising https://stackoverflow.com/questions/36327096/vscode-linter-es6-es7-babel-linter – Babakness Feb 02 '18 at 22:04
  • Ideally one could extend Typescript in the same way so that you can have use new Javascript features while benefitting from types and intellisense. – Babakness Feb 02 '18 at 22:07
  • Sorry I don't remember guide... I think I just cobbled stuff together from different search results. Anyway I've given up for time being, everything just works if I decide to not use special features, so I'm going that route for now :) – Jesse Grosjean Feb 03 '18 at 00:44

0 Answers0