Closed
Description
Version
4.1.2
Environment info
System:
OS: Windows 10
CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Binaries:
Node: 10.15.3 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.387.0
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0
@vue/babel-plugin-transform-vue-jsx: 1.1.2
@vue/babel-preset-app: 4.1.2
@vue/babel-preset-jsx: 1.1.2
@vue/babel-sugar-functional-vue: 1.1.2
@vue/babel-sugar-inject-h: 1.1.2
@vue/babel-sugar-v-model: 1.1.2
@vue/babel-sugar-v-on: 1.1.2
@vue/cli-overlay: 4.1.2
@vue/cli-plugin-babel: ^4.1.0 => 4.1.2
@vue/cli-plugin-eslint: ^4.1.0 => 4.1.2
@vue/cli-plugin-router: 4.1.2
@vue/cli-plugin-vuex: 4.1.2
@vue/cli-service: ^4.1.2 => 4.1.2
@vue/cli-shared-utils: 4.1.2
@vue/component-compiler-utils: 3.1.1
@vue/eslint-config-standard: ^4.0.0 => 4.0.0
@vue/preload-webpack-plugin: 1.1.1
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.3
vue: ^2.6.10 => 2.6.11
vue-eslint-parser: 5.0.0
vue-hot-reload-api: 2.3.4
vue-loader: 15.8.3
vue-router: ^3.1.3 => 3.1.5
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.10 => 2.6.11
vue-template-es2015-compiler: 1.9.1
vuex: ^3.1.2 => 3.1.2
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
-
vue create bugrepo
-
Manually select features
-
Babel、Router、Vuex、CSS Pre-processors、Linter / Formatter
-
Use history mode for router? ===> Yes
-
Sass/SCSS (with dart-sass)
-
ESLint Standard config
-
Lint on save Lint and fix on commit
-
Where do you prefer placing config for ....? ===> In package.json
-
Save this as a ..... ===> No
-
bash:cd bugrepo && npm run serve
-
edit '@/views/Home.vue' like this:
created(){
alert(new Date().getTime())
}
- Save (ctrl s) ====> ERROR:Failed to compile with 1 errors
ERROR Failed to compile with 1 errors 11:38:52
error in ./src/views/Home.vue
Module Error (from ./node_modules/eslint-loader/index.js):
error: Missing space before function parentheses (space-before-function-paren) at src\views\Home.vue:17:10:
15 | HelloWorld
16 | },
> 17 | created(){
| ^
18 | alert(new Date().getTime())
19 | }
20 | }
error: Missing space before opening brace (space-before-blocks) at src\views\Home.vue:17:12:
15 | HelloWorld
16 | },
> 17 | created(){
| ^
18 | alert(new Date().getTime())
19 | }
20 | }
2 errors found.
2 errors potentially fixable with the `--fix` option.
@ ./src/router/index.js 4:0-37 9:13-17
@ ./src/main.js
What is expected?
https://cli.vuejs.org/config/#lintonsave
By default, warnings are only logged to the terminal and does not fail the compilation
What is actually happening?
fail the compilation
Other:
npm list -g --depth=0
C:\Users\Administrator\AppData\Roaming\npm
-- @vue/cli@3.9.1