coderman coderman - 1 year ago 246
Javascript Question

WebStorm - Suppress unused param warning JavaScript

Does anyone know how to suppress unused parameter warning in WebStorm? I tried jslint, but that does not work

/*jslint node: true, unparam: true*/
/*global __dirname: false */
"use strict";
util = require('../util'),
logger = util.getLogger(module.filename),

var UserHelper = module.exports = function () {

* Helper object for user facade
UserHelper.prototype = {
doSomething : function(unusedParam) {
//do something implementation

Answer Source

jshint instead of jslint works for me on WebStorm 8 and WebStorm 9 beta:

/*jshint node:true, unused:false */

Also, make sure you have JSHint (or JSLint) enabled in your preferences. JSHint has "Warn about unused variables". NOTE: This JSHint check does not distinguish between variables and function parameters unless JSHint is configured with unused:vars.

You can also uncheck the "Unused parameters" option under the JSLint configuration screen.

Relevant JSHint doc

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download