Skip to content

Commit

Permalink
fix: fix eslint errors when using airbnb + cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 3, 2018
1 parent cb61f82 commit 313533d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
3 changes: 2 additions & 1 deletion packages/@vue/cli-plugin-e2e-cypress/generator/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = api => {
api.render('./template', {
hasTS: api.hasPlugin('typescript')
hasTS: api.hasPlugin('typescript'),
hasESLint: api.hasPlugin('eslint')
})

api.extendPackage({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<%_ if (hasESLint) { _%>
{
"env": {
"mocha": true
},
"globals": {
"cy": false,
"Cypress": false,
"expect": false,
"assert": false
}
}
<%_ } _%>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// https://docs.cypress.io/guides/guides/plugins-guide.html

module.exports = (on, config) => {
config.fixturesFolder = 'test/e2e/fixtures'
config.integrationFolder = 'test/e2e/specs'
config.screenshotsFolder = 'test/e2e/screenshots'
config.videosFolder = 'test/e2e/videos'
config.supportFile = 'test/e2e/support/index.js'
return config
return Object.assign({}, config, {
fixturesFolder: 'test/e2e/fixtures',
integrationFolder: 'test/e2e/specs',
screenshotsFolder: 'test/e2e/screenshots',
videosFolder: 'test/e2e/videos',
supportFile: 'test/e2e/support/index.js'
})
}

0 comments on commit 313533d

Please sign in to comment.