Can someone tell me why my tests are are failing at this PR https://github.com/processing/p5.js/pull/3633
Just take a look at the travis build:
https://travis-ci.org/processing/p5.js/jobs/509870533#L543
You code seems to be syntactically wrong.
/home/travis/build/processing/p5.js/utils/sample-linter.js:96:7: Parsing error: Unexpected keyword 'var' [Error]
@cansik I am still not getting this. In this casepreprocess
is a function. It should be initialized with var so what is the error in it?
First of all it makes sense to mention the issue you are going to close with this pullrequest. Because I don’t know what you are trying to achieve. Changing the linter form ES5 to ES6 does only work if the toolchain is also changed to ES6.
And your code has semantic errors, as I already told you. processors
is an dictionary, but you are trying to add var to it, which is just not possible. It should look more like preprocess : text => { ... }
.
processors: {
'.js': {
supportsAutofix: true,
var preprocess = text => {
this.lines = splitLines(text);
But as already mentioned, please show us the issue which you try to solve with the pullrequest. And then try to build it yourself locally (at least validate it).