Remove jshint comments

This commit is contained in:
Daniel García Aubert 2020-04-04 17:29:33 +02:00
parent 4054c6923f
commit f583a4240a
5 changed files with 1 additions and 8 deletions

2
app.js
View File

@ -8,10 +8,8 @@ var _ = require('underscore');
var semver = require('semver');
const setICUEnvVariable = require('./lib/utils/icu-data-env-setter');
// jshint undef:false
var log = console.log.bind(console);
var logError = console.error.bind(console);
// jshint undef:true
var nodejsVersion = process.versions.node;
const { engines } = require('./package.json');

View File

@ -5,8 +5,6 @@ const debug = require('debug')('windshaft:cartodb:error-middleware');
module.exports = function errorMiddleware (/* options */) {
return function error (err, req, res, next) {
// jshint unused:false
// jshint maxcomplexity:9
var allErrors = Array.isArray(err) ? err : [err];
allErrors = populateLimitErrors(allErrors);
@ -115,7 +113,6 @@ module.exports.findStatusCode = findStatusCode;
function statusFromErrorMessage (errMsg) {
// Find an appropriate statusCode based on message
// jshint maxcomplexity:7
var statusCode = 400;
if (errMsg.indexOf('permission denied') !== -1) {
statusCode = 403;

View File

@ -83,7 +83,7 @@ TemplateMaps.prototype._redisCmd = function (redisFunc, redisArgs, callback) {
var _reValidNameIdentifier = /^[a-z0-9][0-9a-z_-]*$/i;
var _reValidPlaceholderIdentifier = /^[a-z][0-9a-z_]*$/i;
// jshint maxcomplexity:15
TemplateMaps.prototype._checkInvalidTemplate = function (template) {
if (template.version !== '0.0.1') {
return new Error('Unsupported template version ' + template.version);

View File

@ -15,7 +15,6 @@ function AnalysisMapConfigAdapter (analysisBackend) {
module.exports = AnalysisMapConfigAdapter;
AnalysisMapConfigAdapter.prototype.getMapConfig = function (user, requestMapConfig, params, context, callback) {
// jshint maxcomplexity:7
var self = this;
if (!shouldAdaptLayers(requestMapConfig)) {

View File

@ -392,7 +392,6 @@ describe('template_maps', function () {
});
it('instanciate templates', function () {
// jshint maxcomplexity:7
var tmap = new TemplateMaps(redisPool);
assert.ok(tmap);