Reputation: 4661
I've written a Gruntfile.js where I call grunt.file.delete()
, and JSLint is barking at me, saying, "Expected an identifier and instead saw 'delete' (a reserved word). grunt.file.delete(config[task].dest);
"
config
is an object, task
a string matching the task name, and dest
a path string.
I already have /*jslint node:true */
set at the top of the file.
Does anyone know if this is a valid issue, and if it is, what's the basis and what do I do to fix it?
Upvotes: 0
Views: 151
Reputation: 17789
According to https://github.com/gruntjs/grunt/issues/752
If you enable the es5 option for linting your Gruntfile with JSHint, this error should go away.
Alternatively, just change grunt.file.delete
to grunt.file['delete']
Upvotes: 2