Skip to content

Commit 7a316e3

Browse files
anubhav7495LinusBorg
authored andcommitted
airbnb eslint config compatibility with vuex (vuejs-templates#1003)
1 parent 855b7df commit 7a316e3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

template/.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ module.exports = {
4242
js: 'never',
4343
vue: 'never'
4444
}],
45+
// disallow reassignment of function parameters
46+
// disallow parameter object manipulation except for specific exclusions
47+
'no-param-reassign': ['error', {
48+
props: true,
49+
ignorePropertyModificationsFor: [
50+
'state', // for vuex state
51+
'acc', // for reduce accumulators
52+
'e', // for e.returnvalue
53+
'ctx', // for Koa routing
54+
'req', // for Express requests
55+
'request', // for Express requests
56+
'res', // for Express responses
57+
'response', // for Express responses
58+
'$scope', // for Angular 1 scopes
59+
]
60+
}],
4561
// allow optionalDependencies
4662
'import/no-extraneous-dependencies': ['error', {
4763
optionalDependencies: ['test/unit/index.js']

0 commit comments

Comments
 (0)