current position:Home>Solution to vscode Vue project always reporting space or semicolon warning

Solution to vscode Vue project always reporting space or semicolon warning

2022-04-29 05:17:41Angel's kind

vsCode vue The solution to the problem that the project always reports a space or semicolon warning

Development VUE The following errors are always reported during the project , Pictured :

 Insert picture description here
Before modification .eslintrc.js file :

module.exports = {
    
  root: true,
  parserOptions: {
    
    parser: 'babel-eslint'
  },
  env: {
    
    browser: true,
  },
  extends: [
    'plugin:vue/essential', 
    'standard'
  ],
  plugins: [
    'vue'
  ],
  rules: {
    
    'generator-star-spacing': 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  }
}

Modified .eslintrc.js file

module.exports = {
    
  root: true,
  env: {
    
    node: true
  },
  'extends': [
    'plugin:vue/essential',
    'eslint:recommended'
  ],
  rules: {
    
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  },
  parserOptions: {
    
    parser: 'babel-eslint'
  }
}

Restart again and there will be no error , Pictured :
 Insert picture description here

copyright notice
author[Angel's kind],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/116/202204261122125198.html

Random recommended