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

no-deprecated-api throws a TypeError with global assignment #55

Closed
not-an-aardvark opened this issue Nov 1, 2016 · 0 comments
Closed

Comments

@not-an-aardvark
Copy link
Contributor

not-an-aardvark commented Nov 1, 2016

Hi!

I'm using:

  • Node v6.9.1
  • eslint@3.9.1
  • eslint-plugin-node@3.0.0
  • .eslintrc.yml:
    rules:
      node/no-deprecated-api: error
    plugins:
      - node
    env:
      node: true
    
  • foo.js:
    fs = require('fs');

When I run node_modules/.bin/eslint foo.js, a TypeError is thrown:

TypeError: Cannot read property 'references' of null
    at eachReadReferences (path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:146:13)
    at checkVariable (path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:353:9)
    at checkDestructuring (path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:249:17)
    at checkProperties (path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:323:21)
    at path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:431:29
    at Array.forEach (native)
    at eachReadReferences (path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:146:49)
    at checkCommonJsModules (path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:416:13)
    at EventEmitter.Program:exit (path/to/node_modules/eslint-plugin-node/lib/rules/no-deprecated-api.js:486:13)
    at emitOne (events.js:96:13)


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

2 participants