Satisfy rubocop and jshint
This commit is contained in:
18
.rubocop.yml
18
.rubocop.yml
@@ -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'
|
||||
|
||||
@@ -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('');
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user