Skip to content

Commit cb47a28

Browse files
LinusBorghaoqunjiang
authored andcommitted
fix: airbnb lint should not warn on vuex state mutation (#3961)
close #3954
1 parent 20c96c4 commit cb47a28

File tree

1 file changed

+8
-0
lines changed
  • packages/@vue/eslint-config-airbnb

1 file changed

+8
-0
lines changed

packages/@vue/eslint-config-airbnb/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ module.exports = {
2323
jsx: 'never',
2424
ts: 'never',
2525
tsx: 'never'
26+
}],
27+
'no-param-reassign': ['error', {
28+
props: true,
29+
ignorePropertyModificationsFor: [
30+
'state', // for vuex state
31+
'acc', // for reduce accumulators
32+
'e' // for e.returnvalue
33+
]
2634
}]
2735
}
2836
}

0 commit comments

Comments
 (0)