Satisfy rubocop and jshint

This commit is contained in:
scott
2020-02-04 13:16:43 -07:00
parent 31b68c66a8
commit d362e100e2
2 changed files with 15 additions and 15 deletions

View File

@@ -9,24 +9,24 @@ AllCops:
TargetRubyVersion: 2.3
DisabledByDefault: true
Rails:
Enabled: true
# Rails:
# Enabled: true
# TODO: Resolve the following RuboCop violations
# Offense count: 1
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasAndBelongsToMany:
Exclude:
- 'app/models/user.rb'
# Rails/HasAndBelongsToMany:
# Exclude:
# - 'app/models/user.rb'
# Offense count: 2
# Configuration parameters: Include.
# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
Rails/Output:
Exclude:
- 'config/unicorn.rb'
# Rails/Output:
# Exclude:
# - 'config/unicorn.rb'
# Offense count: 1
# Configuration parameters: AllowSafeAssignment.
@@ -35,7 +35,7 @@ Lint/AssignmentInCondition:
- 'bin/spring'
# Offense count: 2
Lint/HandleExceptions:
Lint/SuppressedException:
Exclude:
- 'bin/rails'
- 'bin/rake'

View File

@@ -494,21 +494,21 @@ Helpy.validateFiles = function (inputFile, allowedExtension, blockedExtension) {
var extError = false;
$.each(inputFile.files, function () {
if (this.size && maxFileSize && this.size > parseInt(maxFileSize)) { sizeExceeded = true; };
if (this.size && maxFileSize && this.size > parseInt(maxFileSize)) { sizeExceeded = true; }
extName = this.name.split('.').pop();
if (allowedExtension.length > 0 && $.inArray(extName, allowedExtension) == -1) { extError = true; };
if (blockedExtension.length > 0 && $.inArray(extName, blockedExtension) != -1) { extError = true; };
if (allowedExtension.length > 0 && $.inArray(extName, allowedExtension) == -1) { extError = true; }
if (blockedExtension.length > 0 && $.inArray(extName, blockedExtension) != -1) { extError = true; }
});
if (sizeExceeded) {
window.alert(maxExceededMessage);
$(inputFile).val('');
};
}
if (extError) {
window.alert(extErrorMessage);
$(inputFile).val('');
};
}
};