:tokyo_tower: A wrapper for Babel's parser used for ESLint (renamed to @babel/eslint-parser)
Fixes https://github.com/babel/babel-eslint/issues/791, also https://github.com/eslint/eslint/issues/12117
Some context: https://github.com/babel/babel-eslint/pull/793#issuecomment-524435971
We ended up going with @JLHwung's PR https://github.com/babel/babel-eslint/pull/794 which uses ESLint's deps instead of going with peerDeps since it really depends on the version being used and we don't want users to have to install it directly on their own.
babel-eslint is patching patches of the dependencies of ESLint itself so these kinds of issues have happened in the past. We'll need to look into figuring out how to have a more solid way of modifying behavior instead of this monkeypatching type of thing for future releases.
Major version bump! Mostly #711 which requires that you have a Babel config file and babel-eslint
will read from that to enable the correct syntax.
The TypeAlias
"conversion" to a function has issues. Sounds like we need to rethink the change, most likely we can just actually change the scoping rather than hardcode an AST change.
Small breaking change: add a peerDependency starting from the ESLint version that added a parser feature that we were monkeypatching before (and drop that code). If already using ESLint 5 shouldn't be any different.
TypeAlias
: https://github.com/babel/babel-eslint/pull/584
/* @flow */
type Node<T> = { head: T; tail: Node<T> }
// or
type File = {chunks: Array<Chunk>}
type Chunk = {file: File}
We've released v7: https://twitter.com/left_pad/status/1034204330352500736, so this just updates babel-eslint to use those versions internally. That in itself doesn't break anything but:
To enable the legacy decorators proposal users should add a specific parser option:
{
parserOptions: {
ecmaFeatures: {
legacyDecorators: true
}
}
}
Use ESLint's API to customize scope analysis and avoid monkeypatching: https://github.com/babel/babel-eslint/pull/542