Skip to content

Commit d758dff

Browse files
authored
tests: fix invoke test to check for new airbnb rule
in eslint config file
1 parent 4bd9c3f commit d758dff

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

packages/@vue/cli/__tests__/invoke.spec.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,23 @@ async function assertUpdates (project) {
4343

4444
const eslintrc = parseJS(await project.read('.eslintrc.js'))
4545
expect(eslintrc).toEqual(Object.assign({}, baseESLintConfig, {
46-
extends: ['plugin:vue/essential', '@vue/airbnb']
46+
extends: ['plugin:vue/essential', '@vue/airbnb'],
47+
rules: {
48+
'no-param-reassign' = ['error', {
49+
props: true,
50+
ignorePropertyModificationsFor: [
51+
'state', // for vuex state
52+
'acc', // for reduce accumulators
53+
'e', // for e.returnvalue
54+
'ctx', // for Koa routing
55+
'req', // for Express requests
56+
'request', // for Express requests
57+
'res', // for Express responses
58+
'response', // for Express responses
59+
'$scope', // for Angular 1 scopes
60+
]
61+
}]
62+
}
4763
}))
4864

4965
const lintedMain = await project.read('src/main.js')

0 commit comments

Comments
 (0)