空格问题

来源:3-3 初始化项目结构

翟敏

2022-05-27

rules: {
        'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
        'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
        'space-before-function-paren': 'off'
    }

老师,我eslint检验空格写了关闭,运行代码还是会报错

ERROR in
D:\zm\vue3\zm-admin\src\router\index.js
   6:1   error  Expected indentation of 2 spaces but found 4   indent
   7:1   error  Expected indentation of 2 spaces but found 4   indent
  10:22  error  Newline required at end of file but not found  eol-last

✖ 3 problems (3 errors, 0 warnings)
  3 errors and 0 warnings potentially fixable with the `--fix` option.


webpack compiled with 1 error
写回答

1回答

Sunday

2022-05-27

你好

你的这个报错(  6:1   error  Expected indentation of 2 spaces but found 4   indent)是另外一个检测规则,你应该提供一个  :  'indent': 'off'

0
1
翟敏
好的,谢谢老师
2022-05-27
共1条回复

基于Vue3新标准,打造后台综合解决方案

基于Vue3重写Vue-element-admin,打造后台前端综合解决方案

1956 学习 · 1724 问题

查看课程