2 ms·
A downside to introducing your own custom syntax with a Babel plugin is that it's likely to break most tools that run on your source code, like editors, ESLint,
by alangpierce 8y ago
A downside to introducing your own custom syntax with a Babel plugin is that it's likely to break most tools that run on your source code, like editors, ESLint, and Prettier. (And, of course, it might conflict with future ES features.)
Also note that Babel's parser isn't pluginizable (normal Babel plugins just run during the transform step), so the typical way to add syntax is to fork the parser and run everything against the forked parser:
https://babeljs.io/docs/en/next/babel-parser.html#will-the-babel-parser-support-a-plugin-system https://babeljs.io/docs/en/next/babel-parser.html#will-the-b...