Enable rule no-plusplus (#10876)
This commit is contained in:
parent
08ec509dc9
commit
76275ec410
|
|
@ -93,7 +93,6 @@ module.exports = {
|
|||
'no-mixed-operators': 0,
|
||||
'no-multi-assign': 0,
|
||||
'no-multi-spaces': 0,
|
||||
'no-plusplus': 0,
|
||||
'no-prototype-builtins': 0,
|
||||
'no-restricted-properties': 0,
|
||||
'no-restricted-syntax': 0,
|
||||
|
|
@ -210,7 +209,6 @@ module.exports = {
|
|||
'no-mixed-operators': 0,
|
||||
'no-multi-assign': 0,
|
||||
'no-multi-spaces': 0,
|
||||
'no-plusplus': 0,
|
||||
'no-prototype-builtins': 0,
|
||||
'no-restricted-properties': 0,
|
||||
'no-restricted-syntax': 0,
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class QuerySearch extends React.PureComponent {
|
|||
|
||||
userMutator(data) {
|
||||
const options = [];
|
||||
for (let i = 0; i < data.pks.length; i++) {
|
||||
for (let i = 0; i < data.pks.length; i += 1) {
|
||||
options.push({
|
||||
value: data.pks[i],
|
||||
label: this.userLabel(data.result[i]),
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class TabbedSqlEditors extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
popNewTab() {
|
||||
queryCount++;
|
||||
queryCount += 1;
|
||||
// Clean the url in browser history
|
||||
window.history.replaceState({}, document.title, this.state.sqlLabUrl);
|
||||
}
|
||||
|
|
@ -221,7 +221,7 @@ class TabbedSqlEditors extends React.PureComponent {
|
|||
return this.props.queryEditors.find(qe => qe.id === qeid) || null;
|
||||
}
|
||||
newQueryEditor() {
|
||||
queryCount++;
|
||||
queryCount += 1;
|
||||
const activeQueryEditor = this.activeQueryEditor();
|
||||
const firstDbId = Math.min(
|
||||
...Object.values(this.props.databases).map(database => database.id),
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export function formatSelectOptionsForRange(start, end) {
|
|||
// formatSelectOptionsForRange(1, 5)
|
||||
// returns [[1,1], [2,2], [3,3], [4,4], [5,5]]
|
||||
const options = [];
|
||||
for (let i = start; i <= end; i++) {
|
||||
for (let i = start; i <= end; i += 1) {
|
||||
options.push([i, i.toString()]);
|
||||
}
|
||||
return options;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ export function areArraysShallowEqual(arr1: unknown[], arr2: unknown[]) {
|
|||
return false;
|
||||
}
|
||||
const { length } = arr1;
|
||||
for (let i = 0; i < length; i++) {
|
||||
for (let i = 0; i < length; i += 1) {
|
||||
if (arr1[i] !== arr2[i]) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ export function optionFromValue(opt) {
|
|||
|
||||
export function prepareCopyToClipboardTabularData(data) {
|
||||
let result = '';
|
||||
for (let i = 0; i < data.length; ++i) {
|
||||
for (let i = 0; i < data.length; i += 1) {
|
||||
result += `${Object.values(data[i]).join('\t')}\n`;
|
||||
}
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class TimeTable extends React.PureComponent {
|
|||
if (column.timeRatio) {
|
||||
// Period ratio sparkline
|
||||
sparkData = [];
|
||||
for (let i = column.timeRatio; i < entries.length; i++) {
|
||||
for (let i = column.timeRatio; i < entries.length; i += 1) {
|
||||
const prevData = entries[i - column.timeRatio][valueField];
|
||||
if (prevData && prevData !== 0) {
|
||||
sparkData.push(entries[i][valueField] / prevData);
|
||||
|
|
|
|||
Loading…
Reference in New Issue