You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
If I add rule "disallowUnusedParams" then files which contains "import" and "function" will throw an error:
import one from 'one';
function some() {}
internalError: Error running rule disallowUnusedParams: This is an issue with JSCS and not your codebase.
Please file an issue (with the stack trace below) at: https://github.com/jscs-dev/node-jscs/issues/new
AssertionError: ImportDeclaration should appear when the mode is ES6 and in the module context.
at Referencer.ImportDeclaration (...path/node_modules/jscs/node_modules/escope/lib/referencer.js:711:17)
at Referencer.Visitor.visit (...path/node_modules/jscs/node_modules/escope/node_modules/esrecurse/esrecurse.js:109:34)
at Referencer.Visitor.visitChildren (...path/node_modules/jscs/node_modules/escope/node_modules/esrecurse/esrecurse.js:88:38)
at Referencer.Program (...path/node_modules/jscs/node_modules/escope/lib/referencer.js:539:22)
at Referencer.Visitor.visit (...path/node_modules/jscs/node_modules/escope/node_modules/esrecurse/esrecurse.js:109:34)
at Object.analyze (...path/node_modules/jscs/node_modules/escope/lib/index.js:130:16)
at Object.JsFile.getScope (...path/node_modules/jscs/lib/js-file.js:757:34)
at Object.<anonymous> (...path/node_modules/jscs/lib/rules/disallow-unused-params.js:94:30)
at Array.forEach (native)
at Object.JsFile.iterateNodesByType (...path/node_modules/jscs/lib/js-file.js:545:42) at some.js :
1 |import one from 'one';
--------^
2 |
3 |function some() {}
but if I remove this rule or import(exactly remove, not comment) then all fine
The text was updated successfully, but these errors were encountered:
If I add rule "disallowUnusedParams" then files which contains "import" and "function" will throw an error:
but if I remove this rule or import(exactly remove, not comment) then all fine
The text was updated successfully, but these errors were encountered: