Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken tests with updated eslint and babel-eslint #336

Closed
pnevyk opened this issue Jun 1, 2018 · 7 comments
Closed

Broken tests with updated eslint and babel-eslint #336

pnevyk opened this issue Jun 1, 2018 · 7 comments

Comments

@pnevyk
Copy link
Contributor

pnevyk commented Jun 1, 2018

Currently, when eslint is updated to 4.19.0 and babel-eslint to 8.2.3, few tests of the plugin are broken. Here is the list:

These failing tests seem to be blocker for #318.

I will try to look at some of those, but any help is appreciated.

@gajus
Copy link
Owner

gajus commented Jun 1, 2018

I will try to look at some of those, but any help is appreciated.

I've tried updating those as well but steered away as I've realised it is not a quick fix.

Thank you for investigating.

@AodhanHayter
Copy link

AodhanHayter commented Jun 1, 2018

Good to know others are seeing this as well. I'm getting false positives for no-unused-vars concerning imported types, for example:

import type Foo from './foo.js' // reported as unused

class Thing {
  constructor(foo: Foo) {
    this.bar = foo.bar
  }
}
  • eslint@4.19.1
  • babel-eslint@8.2.3
  • eslint-plugin-flowtype@2.49.0

This problem is remedied in my case by reverting to babel-eslint@8.0.3

@pnevyk
Copy link
Contributor Author

pnevyk commented Jun 1, 2018

So the problem is probably that babel-eslint started to use eslint's new scope manager API (here) where a custom Referencer, which visits also type annotations, is implemented. This change was introduced in babel-eslint@8.1.0. This is the reason why our are failing.

This new behavior kind of collides with eslint-plugin-flowtype's no-undef and no-unused-vars fixes. @gajus Do you have any idea what we should do? Perhaps we can let babel-eslint do the scope tasks eventually.

@pnevyk
Copy link
Contributor Author

pnevyk commented Jun 1, 2018

I got no-flow-fix-me-comments and sort-keys working. So the only thing missing is those no-undef and no-unused-vars errors.

@gajus
Copy link
Owner

gajus commented Jun 1, 2018

@gajus Do you have any idea what we should do? Perhaps we can let babel-eslint do the scope tasks eventually.

Happy to remove these and release this as a breaking change.

@pnevyk
Copy link
Contributor Author

pnevyk commented Jun 1, 2018

Happy to remove these and release this as a breaking change.

OK. I will identify differences between our implementation and babel-eslint because I expect some.

I think you can merge #317 if you have no problems with it. It fixes object-type-delimiter rule for new babel-eslint.

@gajus
Copy link
Owner

gajus commented May 18, 2020

Closing as stale.

@gajus gajus closed this as completed May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants