jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.97k stars 515 forks source link

Error running rule disallowUnusedParams: This is an issue with JSCS and not your codebase. #2212

Closed bcowgill closed 8 years ago

bcowgill commented 8 years ago

I have stripped the code down to the minimum to generate the error:

'use strict'; var TemplateComponent = React.createClass({

render: function() { return (

); } });

.jscsrc: { "preset": "google", "esnext": true, "esprima": "esprima-fb", "disallowUnusedParams": true }

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 RangeError: Maximum call stack size exceeded at Referencer.keys as __fallback at Referencer.Visitor.visitChildren (/home/test/node_modules/esrecurse/esrecurse.js:88:33) at Referencer.Visitor.visit (/home/test/node_modules/esrecurse/esrecurse.js:125:14) at Referencer.Visitor.visitChildren (/home/test/node_modules/esrecurse/esrecurse.js:106:26) at Referencer.Visitor.visit (/home/test/node_modules/esrecurse/esrecurse.js:125:14) at Referencer.Visitor.visitChildren (/home/test/node_modules/esrecurse/esrecurse.js:106:26) at Referencer.Visitor.visit (/home/test/node_modules/esrecurse/esrecurse.js:125:14) at Referencer.Visitor.visitChildren (/home/test/node_modules/esrecurse/esrecurse.js:106:26) at Referencer.Visitor.visit (/home/test/node_modules/esrecurse/esrecurse.js:125:14) at Referencer.Visitor.visitChildren (/home/test/node_modules/esrecurse/esrecurse.js:106:26) at lib/templates/unused.js : 1 |'use strict'; --------^ 2 |var TemplateComponent = React.createClass({ 3 |

1 code style error found.

Linux hostname 3.19.0-43-generic #49-Ubuntu SMP Sun Dec 27 19:43:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

node --version v5.10.1 ./node_modules/.bin/jscs --version 2.11.0 npm list | grep esprima ├── esprima-fb@15001.1001.0-dev-harmony-fb │ │ │ │ │ ├── esprima-fb@15001.1001.0-dev-harmony-fb │ │ │ │ ├── esprima-fb@15001.1001.0-dev-harmony-fb │ │ │ │ ├── esprima-fb@15001.1001.0-dev-harmony-fb │ │ │ │ └── esprima@2.7.2 │ ├── esprima@2.7.2 │ │ ├── esprima@2.7.2 │ │ │ ├── esprima-fb@13001.1001.0-dev-harmony-fb ├── esprima@2.7.2

bcowgill commented 8 years ago

I have seen a post saying esprima-fb is deprecated so I removed that from the jscs config and npm removed it as well, but still get the same error.

bcowgill commented 8 years ago

Adding this line to the top of the source code // jscs:disable disallowUnusedParams

Still causes the stack overflow, but does show other errors in the file.

mdevils commented 8 years ago

Can you please test it on 3.0.1?

markelog commented 8 years ago

ping us up if you still has this error