学无先后,达者为师

网站首页 编程语言 正文

ESlint 报错 ESlint: this line has a lines of 103.maximum allowed is100.(max-len)

作者:IS_LeQian 更新时间: 2022-02-28 编程语言
EPERM: operation not permitted
ESlint: this line has a lines of 103.maximum allowed is100.(max-len)

以上报错只要在 .eslinerc.js 文件中 rules 内 添加 'max-len' : ["error", {code : 300}] 具体代码 如下:

rules: {
    'import/extensions': 'off',
    'import/no-extraneous-dependencies': 'off',
    indent: 'off',
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-param-reassign': 'off',
    'template-curly-spacing': 'off',
    'max-len' : ["error", {code : 300}]  // 此处为具体添加代码
  },

原文链接:https://blog.csdn.net/IS_huang/article/details/105711052

栏目分类
最近更新