Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/@vue/cli-plugin-eslint/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ module.exports = (api, { config, lintOn = [] }, _, invoking) => {
require('@vue/cli-plugin-unit-jest/generator').applyESLint(api)
}
}

// lint & fix after create to ensure files adhere to chosen config
// for older versions that do not support the `hooks` feature
try {
api.assertCliVersion('^4.0.0-beta.0')
} catch (e) {
if (config && config !== 'base') {
api.onCreateComplete(() => {
require('../lint')({ silent: true }, api)
})
}
}
}

// In PNPM v4, due to their implementation of the module resolution mechanism,
Expand Down