Comments (4)
The jslint
comment is for sending options to jslint, about ignoring whitespace or whatever. If what you want to do is declare a pre-existing read/write global named W020
then the comment syntax is:
/*global W020: true*/
as a directive I think it would be
directives: {
predef: ['W020']
}
but I'm not sure if that would be read-write. Try the comment syntax first.
from grunt-jslint.
I'm sorry you misunderstood my issue. I am trying to use the Bluebird library. The following code to include the library (from test-file.js):
var Promise = require("bluebird");
results in the following error:
test-file.js:1:5 Read only.
The jslint documentation for this error link says you should include the following comment:
/*jshint -W020 */
This is not working for me.
from grunt-jslint.
That's a jshint directive, and it won't work on jslint.
You might want something more like
/*global Promise:true*/
if your goal is to allow writes to the Promise global.
from grunt-jslint.
Thanks for the help.
/*global Promise:true*/
did not work from test-file.js. I didn't attempt to modify the Bluebird library directly so I resorted to the Gruntfile config:
{directives: {predef: ['Promise']}}
from grunt-jslint.
Related Issues (20)
- Travis build fails for current node 0.11 HOT 5
- Use node-jslint rather than a submodule HOT 9
- Passing es5 -- Not Catching Trailing Commas HOT 8
- Non-trivial exclude rules take forever to filter.
- Remove shelljs dep
- exclude array is ignored HOT 7
- Honor excludes, but use faster algorithm HOT 5
- Error: EISDIR HOT 15
- Reading and removing BOM from UTF8 file HOT 3
- Options.edition with the aboslute path didn't work HOT 7
- Changes to node-jslint HOT 3
- node-jslint will require node 0.8 HOT 1
- How to set jslint options... HOT 1
- Warning: grunt-jslint's interface has changed HOT 2
- Request - option to run custom function if JSLint fails HOT 1
- Why is this error been thrown when I run jslint using grunt to improve my code quality? HOT 2
- Exclude is not working ... HOT 14
- will it be updated? HOT 9
- array.forEach is not a function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-jslint.