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
I noticed that certain errors would be 'missed' from my gulp-jsxcs task when run across a large (ish) number of files; when running the task against one (or a smaller number) of files the error would show up as expected.
Upon investigation I tracked the problem down the the maxErrors limit set in the dependency jscs/lib/config/configuration.js which limits the number of errors returned to gulp-jsxcs index.js file. Because .jsx files cause lots of jscs errors due to the syntax not being recognised (that we consider invalid and filter out), if any valid errors occur after these 'invalid' ones fill up the 'limit' they are never added to the error list and then after the 'invalid' errors are filtered out in index.js's checker.checkString() the task completes without any errors which is incorrect.
Changing:
maxErrors = 50;
to:
maxErrors = 500;
or higher leads to the (wanted) errors turning up again, but this is definitely not an ideal solution to this problem as I'm required to set the limit to an arbitrary large number in order to ensure that my handful of genuine errors turn up, and even then I can't be 100% sure that its working.
Given the restrictions of jscs it might not be particularly easy to resolve this, but hopefully I'm wrong.
Thanks, C
The text was updated successfully, but these errors were encountered:
I noticed that certain errors would be 'missed' from my gulp-jsxcs task when run across a large (ish) number of files; when running the task against one (or a smaller number) of files the error would show up as expected.
Upon investigation I tracked the problem down the the maxErrors limit set in the dependency jscs/lib/config/configuration.js which limits the number of errors returned to gulp-jsxcs index.js file. Because .jsx files cause lots of jscs errors due to the syntax not being recognised (that we consider invalid and filter out), if any valid errors occur after these 'invalid' ones fill up the 'limit' they are never added to the error list and then after the 'invalid' errors are filtered out in index.js's checker.checkString() the task completes without any errors which is incorrect.
Changing:
maxErrors = 50;
to:
maxErrors = 500;
or higher leads to the (wanted) errors turning up again, but this is definitely not an ideal solution to this problem as I'm required to set the limit to an arbitrary large number in order to ensure that my handful of genuine errors turn up, and even then I can't be 100% sure that its working.
Given the restrictions of jscs it might not be particularly easy to resolve this, but hopefully I'm wrong.
Thanks, C
The text was updated successfully, but these errors were encountered: