Merge pull request #3496 from overleaf/ae-eslint-dot-notation
Enable the eslint dot-notation rule GitOrigin-RevId: e11cbad3e8a77a4a60590d3674fbf34feccc5bc9
This commit is contained in:
@@ -208,29 +208,26 @@ const FeaturesUpdater = {
|
||||
// Special merging logic for non-boolean features
|
||||
if (key === 'compileGroup') {
|
||||
if (
|
||||
features['compileGroup'] === 'priority' ||
|
||||
featuresB['compileGroup'] === 'priority'
|
||||
features.compileGroup === 'priority' ||
|
||||
featuresB.compileGroup === 'priority'
|
||||
) {
|
||||
features['compileGroup'] = 'priority'
|
||||
features.compileGroup = 'priority'
|
||||
} else {
|
||||
features['compileGroup'] = 'standard'
|
||||
features.compileGroup = 'standard'
|
||||
}
|
||||
} else if (key === 'collaborators') {
|
||||
if (
|
||||
features['collaborators'] === -1 ||
|
||||
featuresB['collaborators'] === -1
|
||||
) {
|
||||
features['collaborators'] = -1
|
||||
if (features.collaborators === -1 || featuresB.collaborators === -1) {
|
||||
features.collaborators = -1
|
||||
} else {
|
||||
features['collaborators'] = Math.max(
|
||||
features['collaborators'] || 0,
|
||||
featuresB['collaborators'] || 0
|
||||
features.collaborators = Math.max(
|
||||
features.collaborators || 0,
|
||||
featuresB.collaborators || 0
|
||||
)
|
||||
}
|
||||
} else if (key === 'compileTimeout') {
|
||||
features['compileTimeout'] = Math.max(
|
||||
features['compileTimeout'] || 0,
|
||||
featuresB['compileTimeout'] || 0
|
||||
features.compileTimeout = Math.max(
|
||||
features.compileTimeout || 0,
|
||||
featuresB.compileTimeout || 0
|
||||
)
|
||||
} else {
|
||||
// Boolean keys, true is better
|
||||
|
||||
@@ -992,18 +992,18 @@ const RecurlyWrapper = {
|
||||
_parseXml(xml, callback) {
|
||||
var convertDataTypes = function(data) {
|
||||
let key, value
|
||||
if (data != null && data['$'] != null) {
|
||||
if (data['$']['nil'] === 'nil') {
|
||||
if (data != null && data.$ != null) {
|
||||
if (data.$.nil === 'nil') {
|
||||
data = null
|
||||
} else if (data['$'].href != null) {
|
||||
data.url = data['$'].href
|
||||
delete data['$']
|
||||
} else if (data['$']['type'] === 'integer') {
|
||||
data = parseInt(data['_'], 10)
|
||||
} else if (data['$']['type'] === 'datetime') {
|
||||
data = new Date(data['_'])
|
||||
} else if (data['$']['type'] === 'array') {
|
||||
delete data['$']
|
||||
} else if (data.$.href != null) {
|
||||
data.url = data.$.href
|
||||
delete data.$
|
||||
} else if (data.$.type === 'integer') {
|
||||
data = parseInt(data._, 10)
|
||||
} else if (data.$.type === 'datetime') {
|
||||
data = new Date(data._)
|
||||
} else if (data.$.type === 'array') {
|
||||
delete data.$
|
||||
let array = []
|
||||
for (key in data) {
|
||||
value = data[key]
|
||||
|
||||
Reference in New Issue
Block a user