You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scaffold a project with unit testing, but without linter/formatter
Select Jest for unit testing
Finish project creation, move in project directory
Run vue add eslint and then select prettier
What is expected?
Step should succeed without issue, eslint plugin added into project.
What is actually happening?
The following error will appear:
TypeError: require(...).applyESLint is not a function
TypeError: require(...).applyESLint is not a function
at module.exports (/Users/meowwoof/code/tester/node_modules/@vue/cli-plugin-eslint/generator/index.js:101:54)
at Generator.initPlugins (/Users/meowwoof/.nvm/versions/node/v10.15.3/lib/node_modules/@vue/cli/lib/Generator.js:150:13)
at process._tickCallback (internal/process/next_tick.js:68:7)
Was trying to add eslint into a scaffolded project when I ran into this bug.
Additional note: If the project was scaffolded with both eslint and jest selected at the time of creation, everything is ok. Problem only surfaces if eslint is added after project has been scaffolded with Jest.
The text was updated successfully, but these errors were encountered:
For those who might have gotten stuck at the same issue, a workaround is simply to remove @vue/cli-plugin-unit-jest (e.g. yarn remove @vue/cli-plugin-unit-jest), install eslint@^5 manually first and then run vue add eslint.
Once that's done, you can safely add jest back again (vue add unit-jest)
Version
4.1.2
Environment info
Steps to reproduce
vue add eslint
and then select prettierWhat is expected?
Step should succeed without issue, eslint plugin added into project.
What is actually happening?
The following error will appear:
Was trying to add eslint into a scaffolded project when I ran into this bug.
Apparently
applyESLint
function was removed in this particular change:2e1e92b#diff-29994942bb568c5548a12d8103751233L144-L150
but is still expected by by eslint plugin while in the process of being added into the project when it detects the jest plugin:
vue-cli/packages/@vue/cli-plugin-eslint/generator/index.js
Line 104 in 2e1e92b
Additional note: If the project was scaffolded with both eslint and jest selected at the time of creation, everything is ok. Problem only surfaces if eslint is added after project has been scaffolded with Jest.
The text was updated successfully, but these errors were encountered: