mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
ESlint array-bracket-spacing
and object-property-newline
This commit is contained in:
@@ -16,3 +16,4 @@ logs/
|
|||||||
*.iws
|
*.iws
|
||||||
/coverage
|
/coverage
|
||||||
/build
|
/build
|
||||||
|
.eslintrc
|
||||||
|
|||||||
@@ -107,8 +107,8 @@
|
|||||||
"dot-notation": "off",
|
"dot-notation": "off",
|
||||||
"func-call-spacing": "off",
|
"func-call-spacing": "off",
|
||||||
"newline-per-chained-call": "off",
|
"newline-per-chained-call": "off",
|
||||||
"array-bracket-spacing": "off",
|
// "array-bracket-spacing": "off",
|
||||||
"object-property-newline": "off",
|
// "object-property-newline": "off",
|
||||||
// "no-continue": "off",
|
// "no-continue": "off",
|
||||||
// "no-extra-semi": "off",
|
// "no-extra-semi": "off",
|
||||||
// "no-spaced-func": "off",
|
// "no-spaced-func": "off",
|
||||||
|
|||||||
@@ -94,7 +94,9 @@ define('admin/extend/widgets', ['jqueryui'], function (jqueryui) {
|
|||||||
if (data[d].name) {
|
if (data[d].name) {
|
||||||
if (widgetData[data[d].name]) {
|
if (widgetData[data[d].name]) {
|
||||||
if(!Array.isArray(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);
|
widgetData[data[d].name].push(data[d].value);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -56,7 +56,15 @@ module.exports = function (db, module) {
|
|||||||
$project: {
|
$project: {
|
||||||
value: 1,
|
value: 1,
|
||||||
score: {
|
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',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ module.exports = function (Meta) {
|
|||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
postcss(global.env === 'development' ? [ autoprefixer ] : [
|
postcss(global.env === 'development' ? [autoprefixer] : [
|
||||||
autoprefixer,
|
autoprefixer,
|
||||||
clean({
|
clean({
|
||||||
processImportFrom: ['local'],
|
processImportFrom: ['local'],
|
||||||
|
|||||||
@@ -585,14 +585,14 @@ describe('Controllers', function () {
|
|||||||
widgets: [
|
widgets: [
|
||||||
{
|
{
|
||||||
widget: 'html',
|
widget: 'html',
|
||||||
data: [ {
|
data: [{
|
||||||
widget: 'html',
|
widget: 'html',
|
||||||
data: {
|
data: {
|
||||||
html: 'test',
|
html: 'test',
|
||||||
title: '',
|
title: '',
|
||||||
container: '',
|
container: '',
|
||||||
},
|
},
|
||||||
} ],
|
}],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user