diff --git a/.eslintignore b/.eslintignore index 1692d5add2..3278600389 100644 --- a/.eslintignore +++ b/.eslintignore @@ -16,3 +16,4 @@ logs/ *.iws /coverage /build +.eslintrc diff --git a/.eslintrc b/.eslintrc index 0664b80eae..fce036ca1a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -107,8 +107,8 @@ "dot-notation": "off", "func-call-spacing": "off", "newline-per-chained-call": "off", - "array-bracket-spacing": "off", - "object-property-newline": "off", + // "array-bracket-spacing": "off", + // "object-property-newline": "off", // "no-continue": "off", // "no-extra-semi": "off", // "no-spaced-func": "off", diff --git a/public/src/admin/extend/widgets.js b/public/src/admin/extend/widgets.js index b8a07d9d97..c949090036 100644 --- a/public/src/admin/extend/widgets.js +++ b/public/src/admin/extend/widgets.js @@ -94,7 +94,9 @@ define('admin/extend/widgets', ['jqueryui'], function (jqueryui) { if (data[d].name) { if (widgetData[data[d].name]) { if(!Array.isArray(widgetData[data[d].name])) { - widgetData[data[d].name] = [ widgetData[data[d].name] ]; + widgetData[data[d].name] = [ + widgetData[data[d].name], + ]; } widgetData[data[d].name].push(data[d].value); }else{ diff --git a/src/database/mongo/sorted/intersect.js b/src/database/mongo/sorted/intersect.js index 2aa51ef8e8..4a58b6d72e 100644 --- a/src/database/mongo/sorted/intersect.js +++ b/src/database/mongo/sorted/intersect.js @@ -56,7 +56,15 @@ module.exports = function (db, module) { $project: { value: 1, score: { - $cond: { if: { $eq: [ "$_key", sets[index] ] }, then: { $multiply: [ '$score', weight ] }, else: '$score' }, + $cond: { + if: { + $eq: ["$_key", sets[index]], + }, + then: { + $multiply: ['$score', weight], + }, + else: '$score', + }, }, }, }); diff --git a/src/meta/css.js b/src/meta/css.js index 99c4abd96b..b3f75ae368 100644 --- a/src/meta/css.js +++ b/src/meta/css.js @@ -143,7 +143,7 @@ module.exports = function (Meta) { return callback(err); } - postcss(global.env === 'development' ? [ autoprefixer ] : [ + postcss(global.env === 'development' ? [autoprefixer] : [ autoprefixer, clean({ processImportFrom: ['local'], diff --git a/test/controllers.js b/test/controllers.js index 1d9399ef24..8c426e24ea 100644 --- a/test/controllers.js +++ b/test/controllers.js @@ -585,14 +585,14 @@ describe('Controllers', function () { widgets: [ { widget: 'html', - data: [ { + data: [{ widget: 'html', data: { html: 'test', title: '', container: '', }, - } ], + }], }, ], };