Skip to main content

Questions tagged [gjslint]

Npm package to work with Grunt which validate files with Google Closure Linter.

1 vote
0 answers
109 views

Is there a way to lint only modified part in a .js file before git commit?

I will maintain a old project and I must check self commited code with some lint tool, such as eslint or gjslint. If simply run gjslint or eslint for a .js file, I will get all the lint error... I ...
Icove's user avatar
  • 11
0 votes
1 answer
50 views

Why does running Google JavaScript Linter via Grunt fail?

We use gjslinter with Grunt to lint all the js files in our project. The configuration in Gruntfile.js looks like this: gjslint: { options: { flags: ['--disable 220,110,200'], ...
Timo Ernst's user avatar
  • 15.8k
3 votes
1 answer
5k views

Does GIT cache pre-commit hooks

Due to gJSLint spewing out errors because of missing member documentation. We updated our pre-commit hook tasked with linting JavaScript. The edit included gJSLint rule 220 (ignore missing member ...
Ben Crowhurst's user avatar
1 vote
1 answer
107 views

why "Optional parameter name %s must be prefixed with opt_." in gjslint --strict mode?

I get the following on one particular javascript file Line 23, E:0233: Optional parameter name category must be prefixed with opt_. Line 649, E:0233: Optional parameter name animate must be prefixed ...
bugmagnet's user avatar
  • 7,719
0 votes
0 answers
453 views

gjslint not reporting any error on file without jsdoc whatsoever

I read somewhere that with jsdoc in your JavaScript and the google closure tool gjslint you can strongly type your javascript. It's not really strongly typed but the tool will report on uncommented ...
HMR's user avatar
  • 38.8k
0 votes
1 answer
299 views

Is it possible to check function arguments by google closure linter (gjslint) tool?

For example, I have the following script "test.js": /** * Adds two numbers. * @param {number} a First number. * @param {number} b First number. * @return {number} Sum of two numbers. */ function ...
user607854's user avatar
0 votes
1 answer
132 views

jslint - jslint4java - how to skip checking Required Blocks condition in javascript

I must use a condition like this in my Javascript code if (condition) statement; but it returns an error (" Expected '{' and instead saw ' '. ") while validating using jslint4java. Is there is ...
Akhil's user avatar
  • 1
3 votes
1 answer
1k views

Why is it that "Member must not have @private JsDoc"?

I'm cleaning up my code with the gjslint tool from Google Closure Tools. It is reporting the following error: Line 15, E:0222: Member "this._dictionary" must not have @private JsDoc And this is the ...
J. Frankenstein's user avatar
1294 votes
8 answers
552k views

What is "Linting"?

PHPLint, JSLint, and I recently came across "you can lint your JS code on the fly" while reading something about some IDE. So, what is "linting"?
Ashkan Kh. Nazary's user avatar
16 votes
4 answers
10k views

why "Single-quoted string preferred over double-quoted string." in js?

While using gjslint, I got a hint: "Single-quoted string preferred over double-quoted string". So why? I'm a little confused with this. Why single-quoted preferred? Hope to get some help. Thanks all....
Lynn's user avatar
  • 665
0 votes
2 answers
420 views

how do I know what version of gjslint I have installed?

This may be a dumb question, but I cannot figure it out. Doing gjslint --help does not provide the answer, and --version is not a valid flag. Any ideas?
pocketfullofcheese's user avatar