-
-
Notifications
You must be signed in to change notification settings - Fork 209
Exported class is defined but never used #8
Comments
Fixed as of 1.0.8, thanks! |
Or not... |
ES6 scoping is still experimental in escope. We are still finding edge cases and this is probably one of them. |
Could probably turn it into a function expression with the init of a variable declaration. Would need to inject a semicolon token into the token stream though to satisfy all the other rules. |
+1, |
Yup same for |
Should be fixed if you upgrade |
@sebmck I've installed v2 and I'm getting this error now $ eslint --ext .js,.jsx .
TypeError: Cannot read property 'VISITOR_KEYS' of undefined
at monkeypatch (/usr/local/lib/node_modules/babel-eslint/index.js:36:35)
at Object.exports.parse (/usr/local/lib/node_modules/babel-eslint/index.js:50:5)
at parse (/usr/local/lib/node_modules/eslint/lib/eslint.js:454:27)
at EventEmitter.module.exports.api.verify (/usr/local/lib/node_modules/eslint/lib/eslint.js:606:15)
at processFile (/usr/local/lib/node_modules/eslint/lib/cli-engine.js:193:27)
at /usr/local/lib/node_modules/eslint/lib/cli-engine.js:293:26
at /usr/local/lib/node_modules/eslint/lib/util/traverse.js:61:17
at Array.forEach (native)
at traverse (/usr/local/lib/node_modules/eslint/lib/util/traverse.js:41:54)
at /usr/local/lib/node_modules/eslint/lib/util/traverse.js:63:17 $ npm -g list |grep eslint
├─┬ [email protected]
├─┬ [email protected] |
@emmenko Fixed. |
@sebmck thx, that fixed it. Having a different problem now regarding import React from 'react/addons'
let {PureRenderMixin} = React.addons
// 2:24 error 'React' is not defined no-undef Do I have to change some kind of configuration when upgrading to |
@emmenko Yep, this is an internal ESLint/escope issue that needs to be fixed. Needs to be fixed on their end. Reference: estools/escope#51 |
Ah ok thanks. Just wondering because it was working before... ;) |
@sebmck there still seems to be some weirdness with This gives a linting error function foo(){}
export { foo };
// 1:9 error foo is defined but never used no-unused-vars while these are ok export function foo(){} class foo{}
export { foo }; |
says
The text was updated successfully, but these errors were encountered: