Updapte eslintrc no-param-reassign with 'ignorePropertyModificationsFor'
This commit is contained in:
parent
44d251edf7
commit
254cfcb7f4
14 changed files with 13 additions and 15 deletions
|
@ -33,6 +33,15 @@ rules:
|
|||
- error
|
||||
- max: 1
|
||||
promise/catch-or-return: error
|
||||
no-param-reassign:
|
||||
- error
|
||||
- props: true
|
||||
ignorePropertyModificationsFor:
|
||||
- "acc" # for reduce accumulators
|
||||
- "accumulator" # for reduce accumulators
|
||||
- "el" # for DOM elements
|
||||
- "element" # for DOM elements
|
||||
- "state" # for Vuex mutations
|
||||
no-underscore-dangle:
|
||||
- error
|
||||
- allow:
|
||||
|
|
|
@ -107,7 +107,6 @@ export default {
|
|||
},
|
||||
|
||||
[types.EXPAND_ALL_FILES](state) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
state.diffFiles = state.diffFiles.map(file => ({
|
||||
...file,
|
||||
collapsed: false,
|
||||
|
|
|
@ -65,8 +65,8 @@ export const hideMenu = (el) => {
|
|||
|
||||
const parentEl = el.parentNode;
|
||||
|
||||
el.style.display = ''; // eslint-disable-line no-param-reassign
|
||||
el.style.transform = ''; // eslint-disable-line no-param-reassign
|
||||
el.style.display = '';
|
||||
el.style.transform = '';
|
||||
el.classList.remove(IS_ABOVE_CLASS);
|
||||
parentEl.classList.remove(IS_OVER_CLASS);
|
||||
parentEl.classList.remove(IS_SHOWING_FLY_OUT_CLASS);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
import * as types from './mutation_types';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
import * as types from './mutation_types';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
import * as types from './mutation_types';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
import * as types from './mutation_types';
|
||||
import { normalizeJob } from './utils';
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
import * as types from './mutation_types';
|
||||
import projectMutations from './mutations/project';
|
||||
import mergeRequestMutation from './mutations/merge_request';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
import * as types from '../mutation_types';
|
||||
import { sortTree } from '../utils';
|
||||
import { diffModes } from '../../constants';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
|
||||
import * as types from './mutation_types';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -132,10 +132,8 @@ export default {
|
|||
if (this.pipeline.ref) {
|
||||
return Object.keys(this.pipeline.ref).reduce((accumulator, prop) => {
|
||||
if (prop === 'path') {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
accumulator.ref_url = this.pipeline.ref[prop];
|
||||
} else {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
accumulator[prop] = this.pipeline.ref[prop];
|
||||
}
|
||||
return accumulator;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
import * as types from './mutation_types';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -28,7 +28,7 @@ Vue.http.interceptors.push((request, next) => {
|
|||
response.headers.forEach((value, key) => {
|
||||
headers[key] = value;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
response.headers = headers;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -5,6 +5,7 @@ export const headersInterceptor = (request, next) => {
|
|||
response.headers.forEach((value, key) => {
|
||||
headers[key] = value;
|
||||
});
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
response.headers = headers;
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue