Skip to content

Commit 313533d

Browse files
committed
fix: fix eslint errors when using airbnb + cypress
1 parent cb61f82 commit 313533d

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

packages/@vue/cli-plugin-e2e-cypress/generator/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = api => {
22
api.render('./template', {
3-
hasTS: api.hasPlugin('typescript')
3+
hasTS: api.hasPlugin('typescript'),
4+
hasESLint: api.hasPlugin('eslint')
45
})
56

67
api.extendPackage({
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<%_ if (hasESLint) { _%>
2+
{
3+
"env": {
4+
"mocha": true
5+
},
6+
"globals": {
7+
"cy": false,
8+
"Cypress": false,
9+
"expect": false,
10+
"assert": false
11+
}
12+
}
13+
<%_ } _%>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// https://docs.cypress.io/guides/guides/plugins-guide.html
22

33
module.exports = (on, config) => {
4-
config.fixturesFolder = 'test/e2e/fixtures'
5-
config.integrationFolder = 'test/e2e/specs'
6-
config.screenshotsFolder = 'test/e2e/screenshots'
7-
config.videosFolder = 'test/e2e/videos'
8-
config.supportFile = 'test/e2e/support/index.js'
9-
return config
4+
return Object.assign({}, config, {
5+
fixturesFolder: 'test/e2e/fixtures',
6+
integrationFolder: 'test/e2e/specs',
7+
screenshotsFolder: 'test/e2e/screenshots',
8+
videosFolder: 'test/e2e/videos',
9+
supportFile: 'test/e2e/support/index.js'
10+
})
1011
}

0 commit comments

Comments
 (0)