• vue.js


    当我们使用vue开发项目时,发现经常报一些莫名的错误,什么空格没写、

    什么双引号要改为单引号,这对于有强迫症的同学来说,真是有句mmp不知当讲不当讲。

    因为vue版本的不同,所以不同版本的去掉eslint的方式也不同。因为网上没看到我这个版本的去除方法。

    所以我斗胆上传我这个版本的方法1:

    首先找到/build/webpack.base.conf.js文件,然后找到createLintingRule关键词所在地方

    具体配置如下:

    const createLintingRule = () => ({
      // test: /.(js|vue)$/,
      // loader: 'eslint-loader',
      // enforce: 'pre',
      // include: [resolve('src'), resolve('test')],
      // options: {
      //   formatter: require('eslint-friendly-formatter'),
      //   emitWarning: !config.dev.showEslintErrorsInOverlay
      // }
    })

    如上所示,把里面内容注释掉,然后npm run dev跑一跑。

    没错只要你不犯原则上的错误,它都是可以原谅的。

    如果你觉得上面的方法麻烦,没事还有一个简单点的方法:

    首先找到config/index.js文件夹,打开,

     // Various Dev Server settings
        host: 'localhost', // can be overwritten by process.env.HOST
        port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
        autoOpenBrowser: true,
        errorOverlay: true,
        notifyOnErrors: true,
        poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
    
        // Use Eslint Loader?
        // If true, your code will be linted during bundling and
        // linting errors and warnings will be shown in the console.
        useEslint: false,  // 将这里改成false 就ok 了,默认是true。

    上面两张方法任意一种都可以让你肆无忌惮的写代码了。

  • 相关阅读:
    概述反射和序列化
    读书笔记6pandas简单使用
    读书笔记5基于matplotlib画图
    读书笔记4数据的读入和保存
    读书笔记3数组的一些常用函数
    introduction to python for statistics,analysis笔记3
    introduction to python for statistics,analysis笔记2
    introduction to anaconda
    图像的线性空间滤波matlab实现
    C-I/O操作函数详解
  • 原文地址:https://www.cnblogs.com/lafitewu/p/8308636.html
Copyright © 2020-2023  润新知